2017-09-28 80 views
0

我越来越奇怪的错误404没有发现错误。我已经正确安装angular2-MDL与npm install angular2-mdl --save,我可以在node_modules目录很容易找到它里面angular2-mdl 404(未找到)

这里是我的app.module.ts

我也想提一提的是,当它运行npm start我得到没有错误。

但是当我在浏览器中运行,我得到404错误,并在控制台中,我可以看到它是指向http://localhost:3000/angular2-mdl,我知道它应该是http://localhost:3000/node_modules/angular2-mdl我不知道为什么它正在发生。

如何修复这个错误

请评论,如果更多信息需要

回答

0

在几个方面的调试后,我发现该错误是systemjs.config.js

我要补充

map: { 
    // our app is within the app folder 
    app: 'app', 
    // angular bundles 
    'angular2-mdl': 'npm:angular2-mdl/bundle/angular2-mdl.js', //added this 
    // other libraries 

},