angular-phonecat upgrading from 1.x : error Failed

2019-06-12 19: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条回答
放我归山
2楼-- · 2019-06-12 20:42

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',
查看更多
登录 后发表回答