Angular 2 'component' is not a known element

后端 未结 15 2111
傲寒
傲寒 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:52

    In my case, my app had multiple layers of modules, so the module I was trying to import had to be added into the module parent that actually used it pages.module.ts, instead of app.module.ts.

提交回复
热议问题