在angular中未找到任何组件工厂
我确实首先将我的模块导入到app.module.ts中,它运行良好在angular中未找到任何组件工厂,angular,typescript,Angular,Typescript,我确实首先将我的模块导入到app.module.ts中,它运行良好 import { DisabledFeedbackFormModule } from './public/disabled-feedback-form/disabled-feedback-form.module'; imports: [ DisabledFeedbackFormModule 但因为我不想在应用程序模块上使用它,因为这个模块只与反馈模块相关,所以我只需要在那里导入它,而不是在应用程序模块上,现在我收
import { DisabledFeedbackFormModule } from './public/disabled-feedback-form/disabled-feedback-form.module';
imports: [
DisabledFeedbackFormModule
但因为我不想在应用程序模块上使用它,因为这个模块只与反馈模块相关,所以我只需要在那里导入它,而不是在应用程序模块上,现在我收到错误
"No component factory found for DisabledFeedbackFormComponent. Did you add it to @NgModule.entryComponents?"
如果您使用的是Angular version<9,请多谢 在DisabledFeedbackFormModule模块中,确保
[imports: DisabledFeedbackFormComponent],
[entryComponents: DisabledFeedbackFormComponent]
另一个选项是升级到angular 9请参见,因为我看到您正在动态创建此禁用反馈组件,可能使用MatDialog?