angular2报错:zone.js:344 Unhandled Promise rejection: Failed to load app.htm

09-17 16:28:29   来源:   评论: 点击:

zone js:344 Unhandled Promise rejection: Failed to load app html ; Zone: ; Task: Promise then ; Value: Failed to load app html
zone.js:1263 GET http://localhost:3000/app.html 404 (Not Found)scheduleTask @ zone.js:1263ZoneDelegate.scheduleTask @ zone.js:205Zone.scheduleMacroTask @ zone.js:142(anonymous function) @ zone.js:1293send @ VM1517:3ResourceLoaderImpl.get @ platform-browser-dynamic.umd.js:129DirectiveNormalizer._fetch @ compiler.umd.js:13455DirectiveNormalizer.normalizeTemplateAsync @ compiler.umd.js:13498DirectiveNormalizer.normalizeDirective @ compiler.umd.js:13473RuntimeCompiler._createCompiledTemplate @ compiler.umd.js:16869(anonymous function) @ compiler.umd.js:16807(anonymous function) @ compiler.umd.js:16805RuntimeCompiler._compileComponents @ compiler.umd.js:16804RuntimeCompiler._compileModuleAndComponents @ compiler.umd.js:16741RuntimeCompiler.compileModuleAsync @ compiler.umd.js:16732PlatformRef_._bootstrapModuleWithZone @ core.umd.js:6954PlatformRef_.bootstrapModule @ core.umd.js:6936(anonymous function) @ app.ts:23(anonymous function) @ app.ts:23(anonymous function) @ app.ts:23__exec @ system.src.js:1510entry.execute @ system.src.js:3926linkDynamicModule @ system.src.js:3252link @ system.src.js:3095execute @ system.src.js:3432doDynamicExecute @ system.src.js:798link @ system.src.js:1000doLink @ system.src.js:652updateLinkSetOnLoad @ system.src.js:700(anonymous function) @ system.src.js:512ZoneDelegate.invoke @ zone.js:192Zone.run @ zone.js:85(anonymous function) @ zone.js:451ZoneDelegate.invokeTask @ zone.js:225Zone.runTask @ zone.js:125drainMicroTaskQueue @ zone.js:357ZoneTask.invoke @ zone.js:297
zone.js:344 Unhandled Promise rejection: Failed to load app.html ; Zone: <root> ; Task: Promise.then ; Value: Failed to load app.html undefinedconsoleError @ zone.js:344_loop_1 @ zone.js:371drainMicroTaskQueue @ zone.js:375ZoneTask.invoke @ zone.js:297
zone.js:346 Error: Uncaught (in promise): Failed to load app.html(…)

从错误提示中可以看出是找不到app.html
anguar2报错

解决办法,将app.html文件放到lesson1根目录下即可:

相关热词搜索:angular2 异常

上一篇:AngularJS那些坑,使用angular时开发者最常犯的十个错误 下一篇:Angular 2.0一直提示Loading...是什么原因?解决办法
分享到: 收藏