我试着用这个:
https://github.com/shlomiassaf/angular2-modal/blob/master/QUICKTHROUGH.md我使用的是安古拉2-webpack,我npm安装了安古拉2-模式。按照上述链接的确切说明,我得到以下错误:
inline template:0:0 caused by: No provider for Overlay!这是我的错,还是其他人也会犯类似的错误?我正在通过以下内容使用最新版本的“角”:https://github.com/AngularClass/angular2-webpack-starter
这是某个RC到最终发布的问题吗?
发布于 2016-10-29 01:26:01
正如链接中提到的,您仍然需要将模块导入到应用程序模块中。
import { ModalModule } from 'angular2-modal';
import { BootstrapModalModule } from 'angular2-modal/plugins/bootstrap';
@NgModule({
imports: [
ModalModule.forRoot(),
BootstrapModalModule
],
declarations: [ AppComponent ],
bootstrap: [ AppComponent ]
})
export class AppModule { }该模块向应用程序提供覆盖服务。
https://stackoverflow.com/questions/40312053
复制相似问题