Angular 5: “No provider for ControlContainer”

前端 未结 12 1165
独厮守ぢ
独厮守ぢ 2020-12-14 14:50

I have a little web app with Angular 5 and out of a sudden I am getting this strange error message in my browser console:

ncaught Error: Template parse error         


        
12条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-14 15:09

    In case someone is still having this error while using the Angular CLI, i was only importing the ReactiveFormsModule, then i imported and registered the FormsModule to fix the error. I was serving the app with ng serve when i made changes to the module class and i was still having the error even after importing and registered the FormsModule. To fix the error i had to stop serving and start again in order to recompile the module class.

提交回复
热议问题