2016-08-01

Angular 指令:是扩展的 HTML 属性,带有ng-前缀。

(1)ng-repeat:

<ul>
<li ng-repeat="x in names">
{{ x.name + ', ' + x.country }}</li>
</ul>

(2)

  • 以下方式会创建新的子作用域,并且进行原型继承: ng-repeatng-includeng-switchng-viewng-controller, 用scope: truetransclude: true创建directive

(3)Scope提供$apply方法传播Model的变化。

 

 

 

  

posted on 2016-08-01 20:51  王雪皓  阅读(84)  评论(0编辑  收藏  举报