在Ionic6和Angular8项目中使用组件时出现错误:Error: No component factory found for LoginComponent. Did you add it to @NgModule.entryComponents? 在我的上一篇文章:移动开发:Ionic框架实现注册与登录功能中,实现软件运行时弹出登录页面,使用的就是组件化(component)。
就是增加entryComponents:[LoginComponent],用于解决上面的问题。并且在declarations中加入LoginComponent,不然还会出现“Component LoginComponent is not part of any NgModule or the module has not been imported into your module.”错误。