ng-bind:变量(html标签无效)<p ng-bind="foo"></p>
ng-bind-html:变量(html标签有效)<p ng-bind-html="foo"></p>
ng-bind-template:表达式(html标签无效)<p ng-bind-template="{{foo}}"></p>
ng-bind-html:变量(html标签有效)<p ng-bind-html="foo"></p>
ng-bind-template:表达式(html标签无效)<p ng-bind-template="{{foo}}"></p>
本文详细介绍了 AngularJS 中三种不同的 ngBind 指令:ng-bind、ng-bind-html 和 ng-bind-template 的使用方法及应用场景。通过示例对比了这些指令在处理 HTML 标签时的不同行为。
303

被折叠的 条评论
为什么被折叠?



