有没有办法为选定的DOM元素禁用Angular的双花括号表示法? [英] Is there a way to disable Angular's double curly brace notation for selected DOM elements?
问题描述
在我们的网站上,我们会显示用户生成的内容(博客文章等)。它由Symfony应用程序呈现。目前正在以Angular应用程序的形式重写前端。现在我们注意到当用户的博客文章包含双花括号表示法时,Angular会处理它,这是不受欢迎的。
On our website we display user-generated content (blog posts etc.). It's rendered by a Symfony app. The frontend is currently being rewritten in the form of an Angular app. Now we noticed that when a user's blog post contains double curly brace notation, Angular will process it, which is undesired.
在Angular中是否有一种方法可以禁用双卷曲大括号解析某些DOM元素?
Is there a way in Angular to disable the double curly brace parsing for certain DOM elements?
推荐答案
是的,使用 ng-non-bindable 指令。在包装动态用户可编辑内容的元素中。
Yes, use the ng-non-bindable directive. in the element that wraps your dynamic user editable content.
<div ng-non-bindable>{{some text}}</div>
这篇关于有没有办法为选定的DOM元素禁用Angular的双花括号表示法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!