Angular 学习

特性:

1.模块 -- ng-app 相当于主模块

2.MVC -- 前端责任分离,简化代码,提高复用

  控制器

  模板  {{}}  ng-bind

  作用域  $scope

3.路由

  由主模块制定

  绑定锚点、控制器、模板

  ng-view

4.双向数据绑定

  View <===> Event emit ($scope.watch() $scope.apply() )<===> ng-model 

  {{}} or ng-bind    -- span + ng-bind = {{}}

5.符合SOID设计思想

  从责任上分为 service , directive , filter ,controller 

6.几个angular的自有属性: ng-show ng-hide ng-class ng-click ng-bind ng-model

7.强大的指令

  非常像JSP中的taglib  , 支持第三方扩展

  restrict : A (Attribute),E(Element),M(Comment),C(CSS) 

  <div hello></div>

  <hello></hello>

  <!-- directive:hello -->

  <div class="hello"></div>

  

     

你可能感兴趣的:(Angular)