Reputation: 9229
The following code snippet was generated by the marked
markdown renderer, and is included in my angular 2 template.
<code>
@import { url('~/platform.css') };
</code>
However, it throws the following error:
Unexpected closing tag "code" ("
<code>
@import { url('~/platform.css') };
[ERROR ->]</code>
What is wrong with that code?
Upvotes: 3
Views: 169
Reputation: 657741
I think you need to encode the content like
<code>
{{'@import { url('~/platform.css') };'}}
<code>
if it contains {
or }
Upvotes: 2