抱歉,我是 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! ...