Angularjs – How to escape curly braces for display on page when using AngularJS

angularjs

I want the user to see double curly braces, but Angular binds them automatically. This is the opposite case of this question where they want to not see curly braces used for binding when the page is loading.

I want the user to see this:

My name is {{person.name}}.

But Angular replaces {{person.name}} with the value. I thought this might work, but angular still replaces it with the value:

{{person.name}}

Plunker: http://plnkr.co/edit/XBJjr6uR1rMAg3Ng7DiJ

Best Answer

<code ng-non-bindable>{{person.name}}</code>

Documentation @ ngNonBindable

Related Topic