AngularJS ng-bind 指令
AngularJS 教程
· 2019-04-01 11:16:40
AngularJS 实例
绑定 <p> 内的 innerHTML 到变量 myText:
<div ng-app="" ng-init="myText='Hello World!'">
<p ng-bind="myText"></p>
</div>
<p ng-bind="myText"></p>
</div>
定义和用法
ng-bind 指令告诉 AngularJS 使用给定的变量或表达式的值来替换 HTML 元素的内容。
如果给定的变量或表达式修改了,指定替换的 HTML 元素也会修改。
语法
<element ng-bind="expression"></element>
或作为 CSS 类:
<element class="ng-bind: expression"></element>
所有的 HTML 元素都支持该指令。
参数值
| 值 | 描述 |
|---|---|
| expression | 指定要执行的变量或表达式。 |
点击查看所有 AngularJS 教程 文章: https://www.codercto.com/courses/l/36.html
Web Security Testing Cookbook
Paco Hope、Ben Walther / O'Reilly Media / 2008-10-24 / USD 39.99
Among the tests you perform on web applications, security testing is perhaps the most important, yet it's often the most neglected. The recipes in the Web Security Testing Cookbook demonstrate how dev......一起来看看 《Web Security Testing Cookbook》 这本书的介绍吧!