Angular 2 Final Release Promise Rejection: Unexpec

2019-09-21 07:33发布

问题:

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

回答1:

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>.



标签: angular