Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在angular中未找到任何组件工厂_Angular_Typescript - Fatal编程技术网

在angular中未找到任何组件工厂

在angular中未找到任何组件工厂,angular,typescript,Angular,Typescript,我确实首先将我的模块导入到app.module.ts中,它运行良好 import { DisabledFeedbackFormModule } from './public/disabled-feedback-form/disabled-feedback-form.module'; imports: [ DisabledFeedbackFormModule 但因为我不想在应用程序模块上使用它,因为这个模块只与反馈模块相关,所以我只需要在那里导入它,而不是在应用程序模块上,现在我收

我确实首先将我的模块导入到app.module.ts中,它运行良好

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?