Angluar 报错:No provider for FormBuilder!

  • A+
所属分类:Angluar

Angluar 报错:No provider for FormBuilder!

解决方案

导入ReactiveFormsModuleFormsModule

  1. @NgModule({  
  2.   declarations: [FormsTestComponent],  
  3.   imports: [  
  4.     FormsModule,  
  5.     ReactiveFormsModule,  
  6.   ]  
  7. })  

参考文章

https://stackoverflow.com/questions/40249065/no-provider-for-formbuilder

钰玺

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: