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
Scalable Internet Architectures
Theo Schlossnagle / Sams Publishing / 2006-7-31 / USD 49.99
As a developer, you are aware of the increasing concern amongst developers and site architects that websites be able to handle the vast number of visitors that flood the Internet on a daily basis. Sc......一起来看看 《Scalable Internet Architectures》 这本书的介绍吧!