ng-bind-template 描述:规定要使用模板替换的文本内容。 ...实例: ng-bind-template="{{firstName}} {{lastName}}" ng-controller..."Doe"; }) 定义和用法 ng-bind-template...当你想在HTML元素上绑定多个表达式时可以是使用 ng-bind-template指令。 ...语法: ng-bind-template="expression"> 参数值: 值:expression 描述: 一个或多个要执行的表达式
两个指令都是实现数据绑定 区别:由于{{}}绑定数据时,会因为加载后未渲染属性而导致浏览器闪烁,ng-bind不会闪烁 ng-bind只能执行单个变量绑定 但是可以借助:ng-bind-template...定义一个模板实现多变量绑定 如:ng-bind-template ="{{text}} {{text}}" > 今天就到此为止,明天继续研究指令的生深入研究学习
ng-bind 绑定 HTML 元素到应用程序数据 ng-bind-html 绑定 HTML 元素的 innerHTML 到应用程序数据,并移除 HTML 字符串中危险字符 ng-bind-template
3.2.3、ng-bind-template 同时绑定多个表达式块 ng-bind-template="{{student1}} and {{student2}}"> 示例: {{info2}} ng-bind-template
领取专属 10元无门槛券
手把手带您无忧上云