DEV Community

Hassam Ali
Hassam Ali

Posted on • Edited on

3 1

Disable Interpolation Angular

Alt Text
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>
Enter fullscreen mode Exit fullscreen mode
<div>{{ 1 + 1 }}</div> // <div>2</div>
<div ngNonBindable>{{ 1 + 1 }}</div> // <div>{{1 + 1}}</div>
Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Collapse
 
konradlinkowski profile image
Konrad Linkowski

That's a cool article. I didn't know that.

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay