angular-phonecat upgrading from 1.x : error Failed to load template: app/phone-list/phone-list.template.html (HTTP status: 404 Not Found)

混江龙づ霸主 提交于 2019-12-08 13:24:47

问题


Hi I'm using this tutorial to lean how to migrate from Angular1 to Angular2.

At the end of the step 4 Upgrading the Phone Service, when I want to check the running application with "npm start", i got this error :

angular.js:13920 Error: [$compile:tpload] Failed to load template: app/phone-list/phone-list.template.html (HTTP status: 404 Not Found)

回答1:


It’s just a typo error in the online tutorial.

In the file app/phone-list/phone-list.component.ts change the line :

templateUrl: ‘app/phone-list/phone-list.template.html',

by

templateUrl: 'phone-list/phone-list.template.html',


来源:https://stackoverflow.com/questions/38592472/angular-phonecat-upgrading-from-1-x-error-failed-to-load-template-app-phone-l

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!