Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to escape single curly braces angular 4 template

I have something like

<div ngNonBindable>
  yada yada.... { ... }  blah blah....
<div>

Even with 'ngNonBindable' directive I get error:

compiler.es5.js:1690 Uncaught Error: Template parse errors:
Unexpected character "EOF" (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.) ("
<div>

Two things:

1) Please point me in right direction.

2) Or, a workaround please.

like image 648
zion inc Avatar asked Aug 10 '17 16:08

zion inc


1 Answers

You can use Special Character for { --> &#123; and for } --> &#125;

<div>
  yada yada.... &#123; ... &#125;  blah blah....
<div>
like image 117
suhailvs Avatar answered Sep 22 '22 14:09

suhailvs