Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
224 views
in Technique[技术] by (71.8m points)

Angular 2 Final Release Promise Rejection: Unexpected closing tag "a"

I just moved over to the Angular 2 Final Release and have removed the module.Id code from inside my components but I am getting the following errors when I try to run my application:

zone.js:355 Unhandled Promise rejection: Template parse errors:
Unexpected closing tag "a" ("                         <span>Degree Progress/Audit Report</span>
                                [ERROR ->]</a>
<a href="https://studentweb.stage.it.ucla.edu/StudentWebMVC/app"): WidgetBankComponent@966:32
  at DirectiveNormalizer.normalizeLoadedTemplate (http://localhost:56159/node_modules/@angular/compiler//bundles/compiler.umd.js:13373:21)
    at eval (http://localhost:56159/node_modules/@angular/compiler//bundles/compiler.umd.js:13366:53)
    at ZoneDelegate.invoke (http://localhost:56159/node_modules/zone.js/dist/zone.js:203:28)
    at Zone.run (http://localhost:56159/node_modules/zone.js/dist/zone.js:96:43)
    at http://localhost:56159/node_modules/zone.js/dist/zone.js:462:57
    at ZoneDelegate.invokeTask (http://localhost:56159/node_modules/zone.js/dist/zone.js:236:37)
    at Zone.runTask (http://localhost:56159/node_modules/zone.js/dist/zone.js:136:47)
    at drainMicroTaskQueue (http://localhost:56159/node_modules/zone.js/dist/zone.js:368:35)
    at XMLHttpRequest.ZoneTask.invoke (http://localhost:56159/node_modules/zone.js/dist/zone.js:308:25)consoleError @ zone.js:355_loop_1 @ zone.js:382drainMicroTaskQueue @ zone.js:386ZoneTask.invoke @ zone.js:308
zone.js:357 Error: Uncaught (in promise): Error: Template parse errors:(…)consoleError @ zone.js:357_loop_1 @ zone.js:382drainMicroTaskQueue @ zone.js:386ZoneTask.invoke @ zone.js:308

and I am not exactly sure why.

Any thoughts?

Thanks in advance

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The error message says it all, you have an unmatched closing tag in your template.

Either remove </a> from after the </span> tag, or add a matching <a> before the <span>.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...