Is there a way to disable Angular double curly brace for selected DOM elements?

On our website, we display user-generated content (blog posts, etc.). It is displayed by the Symfony application. The interface is currently being rewritten as an Angular application. Now we have noticed that when a user's blog post contains double curly braces, Angular will process it, which is undesirable.

Is there a way in Angular to turn off double brace parsing for some DOM elements?

+3
source share
2 answers

Yes, use the ng-non-bindable directive . in an element that wraps your dynamic user-editable content.

<div ng-non-bindable>{{some text}}</div>
+9
source

I am not sure of the direct answer for ignoring interpolation on certain elements, but you can change the character used if it contradicts other data that you have:

http://docs.angularjs.org/api/ng.$interpolateProvider#endsymbol

+2
source

All Articles