javascriptangularsystemjsangular2-material

@angular/material.js is not found in angular2 material design


I have following the instructions mentioned in the

https://alligator.io/angular/angular-material-2/

for using angular2material design.while using this am getting the following error

*) Error: (SystemJS) XHR error (404 Not Found) loading http://localhost:5555/node_modules/@angular/material.js

*) 404 Not Found - http://localhost:5555/node_modules/@angular/material.js"

i updated my package.json file and web.module.ts

package.json

"@angular/material": "^2.0.0-beta.1",
"hammerjs": "^2.0.8"

web.module.ts

import { MaterialModule } from '@angular/material';

@NgModule({
 imports: [

MaterialModule.forRoot(),

})

in my folder/file structure and @angular/material/bundle/material.umd.js is definitely there. How do i solve this issue?


Solution

  • Add map path inside system.config.js's configobject.

    '@angular/material': 'node_modules/@angular/material/bundles/material.umd.js',