ng-bootstrap - ng-bootstrap 没有提供 ComponentFactoryResolver - forRoot 不可用
问题描述
抱歉,我是 Angular2 新手,但在尝试使用 ng-bootstrap ngbModal 时遇到“没有 ComponentFactoryResolver 的提供者”。我知道从 v8.0 开始没有forRoot()
选择。所以真的对这个错误感到困惑。
core.js:6014 ERROR Error: Uncaught (in promise):
NullInjectorError: StaticInjectorError(AppModule)[NgbModal -> ComponentFactoryResolver]:
StaticInjectorError(Platform: core)[NgbModal -> ComponentFactoryResolver]:
NullInjectorError: No provider for ComponentFactoryResolver!
NullInjectorError: StaticInjectorError(AppModule)[NgbModal -> ComponentFactoryResolver]:
StaticInjectorError(Platform: core)[NgbModal -> ComponentFactoryResolver]:
NullInjectorError: No provider for ComponentFactoryResolver! ...
解决方案
推荐阅读
- java - JavaFX 3D围绕纬度旋转相机Y
- python - 必须通过只有布尔值错误的数据框?
- javascript - 如何使用从子组件传递给组件的反应变量更新 redux 状态
- c# - 我希望我的角色只朝它正在看的方向移动
- sql - SQL Server 中的动态 SQL 是否比静态 SQL 性能更高?
- reactjs - 为什么要改变 Redux 状态?
- autocomplete - 是否有任何可嵌入的 Web 文本/json 编辑器提供基于 json 模式的自动完成功能?
- android - 通过按下另一个edittext来清除edittext中的文本
- node.js - 为什么升级 npm 并没有真正更新它?
- android - undefined is not an object (evaluate 'this.props.navigation.navigate') 反应原生错误