You can disable string interpolation in angular by using ngNonBindable
directive. This is useful in cases where you want to show some text but do not want it to be interpolated like showing some code snippet.
<div>
In angular pair of curly braces are used for string interpolation e.g
<span ngNonBindable>My name is {{name}}</span>
</div>
<div>{{ 1 + 1 }}</div> // <div>2</div>
<div ngNonBindable>{{ 1 + 1 }}</div> // <div>{{1 + 1}}</div>
Top comments (1)
That's a cool article. I didn't know that.