2017-09-28 78 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 

},