【发布时间】:2017-08-28 00:33:22
【问题描述】:
我目前遇到与 Karma 一起运行的 ngx-bootstrap 的问题。 问题是“Chrome 57.0.2987 (Windows 10 0.0.0) 错误 未捕获的类型错误:无法读取未定义的属性“输出” 在 node_modules/ngx-bootstrap/bundles/ngx-bootstrap.umd.js:8087"
我正在使用 Angular 4.0.0 和“ngx-bootstrap”:“^1.6.6”。这是我的配置
1.包.json
"dependencies":
{
"@angular/common": "~4.0.0",
........................
"ngx-bootstrap": "^1.6.6"
}
2。 Systemjs.config.js
System.config({
......................
map: {
// angular bundles
..............................
'ngx-bootstrap': 'npm:ngx-bootstrap/bundles/ngx-bootstrap.umd.js',
}
});
3. karma.conf.js
module.exports = function (config) {
..................
config.set({
basePath: '',
frameworks: ['jasmine'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'), // click "Debug" in browser to see it
require('karma-htmlfile-reporter') // crashing w/ strange socket error
],
files: [
...................
'node_modules/ngx-bootstrap/bundles/ngx-bootstrap.umd.js',
]
…………
})
}
请帮助我找出问题所在。 (Web 应用使用 ngx-bootstrap 运行良好)
谢谢!
【问题讨论】:
标签: angular