George Edwards George Edwards - 1 year ago 104
HTML Question

inValid html - unexpected closing tag `</code>`

The following code snippet was generated by the

markdown renderer, and is included in my angular 2 template.

@import { url(&#39;~/platform.css&#39;) };

However, it throws the following error:

Unexpected closing tag "code" ("
@import { url(&#39;~/platform.css&#39;) };
[ERROR ->]</code>

What is wrong with that code?

Answer Source

I think you need to encode the content like

{{'@import { url(&#39;~/platform.css&#39;) };'}}

if it contains { or }

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download