Alpha Angular-CLI を使用して新しい Angular 2 アプリを構築しています。ng2-materialライブラリも使用しています。それを機能させるために、私は次のことをしなければなりませんでした:
// index.html
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js
},
'ng2-material': {
format: 'cjs',
defaultExtension: 'js',
main: 'all.js'
}
}
});
System.import('app.js').then(null, console.error.bind(console));
// ember-cli-build.js
var materialTree = BroccoliFunnel('node_modules/ng2-material', {
destDir: 'ng2-material'
});
アプリ自体では問題なく動作します。ただし、実行するng test
と次のエラーが発生します。
始める:
13 04 2016 14:55:36.982: 警告 [web サーバー]: 404: /ng2-material/all
Chrome 49.0.2623 (Mac OS X 10.11.3) エラー
エラー: XHR エラー (404 Not Found) http://localhost:9876/ng2-material/all の読み込み中
at error (/../node_modules/systemjs/dist/system.src.js:1026:16) at XMLHttpRequest.xhr.onreadystatechange (/../node_modules/systemjs/dist/system.src.js:1047:13)
13 04 2016 14:55:37.058: 警告 [web サーバー]: 404: /ng2-material/all
私は何が欠けていますか?