2018-11-07Angular报错?No component factory found for XXXXComponent. Did you add it to @NgModule.ent...

报错信息

 Uncaught (in promise): Error: No component factory found for xxxx. Did you add it to @NgModule.entryComponents?

解决
app.module.ts
在@NgModule的entryComponents声明组件:

@NgModule({
  declarations: [
     todoDetailshPage
  ],
  entryComponents: [ todoDetailshPage],
})
export class AppModule { }
    原文作者:o_41be瑜
    原文地址: https://www.jianshu.com/p/7fba38e1c789
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞