首页 > 解决方案 > 未找到 NgbModalBackdrop 的组件工厂。你把它添加到@NgModule.entryComponents 了吗?即使我将 enteryComponent 添加到我的模块

问题描述

我正在创建一个除应用程序模块之外的角度模块并在其中添加一个enterycomponent“ManageLocationComponent”,但它仍然在控制台中显示相同的错误这是我的代码

 `@NgModule({
  imports: [CommonModule, AngularMaterialModule, ReactiveFormsModule],
  declarations: [AdminManageLocationComponent, ManageLocationComponent],
  exports: [AdminManageLocationComponent, ManageLocationComponent],
  entryComponents: [ManageLocationComponent]
  })`

任何帮助

标签: typescriptangular6

解决方案


如果你仍然有这个问题,我通过NgbModule在 NgModule 中添加到我的导入数组来修复它。同样是的,您还需要看起来已经拥有的 entryComponents。


推荐阅读