如何使用AngularJS当我逃避页面上显示大括号? [英] How do I escape curly braces for display on page when using AngularJS?
问题描述
我希望用户看到双大括号,但角度会自动绑定它们。这是<一个相反的情况下href=\"http://stackoverflow.com/questions/12866447/$p$pvent-double-curly-brace-notation-from-displaying-momentarily-before-angular-j\">this问题他们想去的地方看不到用于页面加载时,结合大括号内。
我希望用户看到这一点:
我的名字是{{person.name}}。
但角替换 {{person.name}}
的值。我想这可能工作,但依然棱角分明的值替换它:
&放大器;#123;&放大器;#123; person.name}}
Plunker: http://plnkr.co/edit/XBJjr6uR1rMAg3Ng7DiJ
&LT; code NG-非绑定&GT; {{person.name}}&LT; / code&GT;
文档@ <一个href=\"http://docs.angularjs.org/api/ng.directive:ngNonBindable\">http://docs.angularjs.org/api/ng.directive:ngNonBindable
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
<code ng-non-bindable>{{person.name}}</code>
Documentation @ http://docs.angularjs.org/api/ng.directive:ngNonBindable
这篇关于如何使用AngularJS当我逃避页面上显示大括号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!