I have an app that loads with Angular 2.0.0, the 9/14/16 release after all the rc releases. I am trying to add Angular Material2, the official MD release from the Google team. I am copy/pasting code from their Getting Started site, except I am using Atom and not angular-cli, as I have already built the beginnings of the app. Atom-typescript finds everything and says there are no errors. But despite thrashing with a lot of trials, I repeatedly get these not found Console errors when the modified app fails to load.
zone.js:1263 GET http://localhost:3000/node_modules/@angular2-material/button/ 404 (Not Found)scheduleTask @ zone.js:1263
home:27 Error: (SystemJS) XHR error (404 Not Found) loading http://localhost:3000/node_modules/@angular2-material/button(…)
zone.js:1263 GET http://localhost:3000/node_modules/@angular2-material/list/ 404 (Not Found)
I have looked at the node_modules files above and they exist in my code.
Per instructions in Getting Started, relevant code is:
app.module.ts
import { MdButtonModule } from '@angular2-material/button';
import { MdListModule } from '@angular2-material/list';
@NgModule({
imports: [ BrowserModule,
FormsModule,
MdButtonModule,
MdListModule,
routing
],
systemjs.config.js
var map = {
'@angular2-material': 'node_modules/@angular2-material',
'@angular2-material/core': 'node_modules/@angular2-material/core/core',
'@angular2-material/list': 'node_modules/@angular2-material/list',
'@angular2-material/button': 'node_modules/@angular2-material/button'
};
var packages = {
'app': { main: 'main.js', defaultExtension: 'js' },
'rxjs': { defaultExtension: 'js' },
'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' },
};
function packIndex(pkgName) {
packages['@angular/'+pkgName] = { main: 'index.js', defaultExtension: 'js' };
}
function packUmd(pkgName) {
packages['@angular/'+pkgName] = { main: 'bundles/' + pkgName + '.umd.js', defaultExtension: 'js' };
}
var setPackageConfig = System.packageWithIndex ? packIndex : packUmd;
ngPackageNames.forEach(setPackageConfig);
The HTML page has a couple md-list, md-list-item and md-button tags.
What should I change?