when you get the message No provider for formbuilder when trying to test a formBuilder , the solution is :

=> Import ReactiveFormsModule and FormsModule in the appModule

@NgModule({
  imports: [
      BrowserModule /* or CommonModule */, 
      FormsModule, ReactiveFormsModule
  ],
  ...
})

Commentaires

  1. Pingback: Angular 2 : Can't bind to 'formGroup' since it isn't a known property of 'form'

Laisser un commentaire