(SOLVED) No Provider for FormBuilder

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
  ],
  ...
})
Marwen Mselmi
Author: Marwen Mselmi

Founder of Javatuto.com, love Java and open source stuff. Follow me on Linkedin.

Leave a comment