【发布时间】:2015-03-18 21:38:31
【问题描述】:
我尝试使用此 (https://github.com/gocardless/es6-angularjs/blob/master/README.md) 作为起点,然后包含 bootstrap javascript 代码。为了打开一个模态
但唯一会发生的是:
Potentially unhandled rejection [3] Error loading "components/bootstrap/dist/js" at http://localhost:3010/components/bootstrap/dist/js.js
Error loading "components/bootstrap/dist/js" from "app-compiled/bootstrap" at http://localhost:3010/app-compiled/bootstrap.js
Not Found: http://localhost:3010/components/bootstrap/dist/js.js (WARNING: non-Error used)
我在 main.js 中添加了这个:
import 'bootstrap-js';
//TODO please explain to me why not working
这个到 loader.config.js 文件:
System.config({
meta: {
...,
'components/bootstrap/dist/js':{ format: 'global', export: 'bootstrap'}
},
map: {
....,
'bootstrap-js': 'components/bootstrap/dist/js'
}
});
【问题讨论】:
标签: javascript angularjs twitter-bootstrap ecmascript-6 gocardless