Component Xxx is not part of any NgModule or the module has not been imported into your module.
原因:没有在NgModule中声明此模板
解决办法:将XxxComponent 添加到 xxx.module.ts文件的@NgModule位置 ,如下
@NgModule({declarations: [XxxComponent],...})
注意大小写。
Component Xxx is not part of any NgModule or the module has not been imported into your module.
@NgModule({declarations: [XxxComponent],...})
注意大小写。