I'm building out a new Angular 2 app with the Alpha Angular-CLI. I'm also using the ng2-material library. In order to even get it to work I had to do the following:
// 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'
});
It works fine in the app itself. However, when I run ng test
I get the following error:
START:
13 04 2016 14:55:36.982:WARN [web-server]: 404: /ng2-material/all
Chrome 49.0.2623 (Mac OS X 10.11.3) ERROR
Error: XHR error (404 Not Found) loading 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:WARN [web-server]: 404: /ng2-material/all
What am I missing?