【发布时间】:2017-03-22 06:02:12
【问题描述】:
我正在使用 Angular 2 RC 5 版本。 在我的 Angular 2 应用程序中,我使用的是 system.config.js,因为我已经映射了 ng2-boostrap 包,如下所示
var map={
'ng2-bootstrap/ng2-bootstrap': 'node_modules/ng2-bootstrap/ng2-bootstrap',
}
在应用程序模块文件中,我正在像下面这样导入它
import {PopoverModule } from 'ng2-bootstrap/ng2-bootstrap';
@NgModule({
imports: [PopoverModule.forRoot()]
})
使用以上所有方法,我仍然在浏览器的控制台中收到如下错误
错误:(SystemJS)无法读取未定义的属性“forRoot” TypeError:无法读取未定义的属性“forRoot” 在评估 (http://localhost:3000/assets/app.module.js:259:149) 执行时 (http://localhost:3000/assets/app.module.js:270:14) 加载时出错http://localhost:3000/assets/main.js
我指的是这个链接https://valor-software.com/ng2-bootstrap/index-bs4.html#/popover
【问题讨论】:
标签: angular ng2-bootstrap