Angular 2 'component' is not a known element

后端 未结 15 2119
傲寒
傲寒 2020-11-30 17:58

I\'m trying to use a component I created inside the AppModule in other modules. I get the following error though:

\"Uncaught (in promise): Error: Temp

15条回答
  •  不知归路
    2020-11-30 18:41

    The problem in my case was missing component declaration in the module, but even after adding the declaration the error persisted. I had stop the server and rebuild the entire project in VS Code for the error to go away.

提交回复
热议问题