从1.x升级angular-phonecat:错误无法加载模板:app/phone-list/phone-list.template.html(HTTP状态:404未找到) [英] angular-phonecat upgrading from 1.x : error Failed to load template: app/phone-list/phone-list.template.html (HTTP status: 404 Not Found)
本文介绍了从1.x升级angular-phonecat:错误无法加载模板:app/phone-list/phone-list.template.html(HTTP状态:404未找到)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用此教程来学习如何从Angular1迁移到Angular2.
Hi I'm using this tutorial to lean how to migrate from Angular1 to Angular2.
步骤末尾4升级电话服务,当我想使用"npm start"检查正在运行的应用程序时,出现此错误:
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)
推荐答案
这只是在线教程中的错字.
It’s just a typo error in the online tutorial.
在文件 app/phone-list/phone-list.component.ts 中 换行:
templateUrl: ‘app/phone-list/phone-list.template.html',
作者
templateUrl: 'phone-list/phone-list.template.html',
这篇关于从1.x升级angular-phonecat:错误无法加载模板:app/phone-list/phone-list.template.html(HTTP状态:404未找到)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文