Reference: Http://campus.codeschool.com/courses/shaping-up-with-angular-js/contents
3) Using variables
Hello {{' World '}}!
4) Ng-model for two-way binding
<input type= "text" ng-model= "yourname" placeholder= "World" >
5) Whether the ng-show is displayed
Ng-show={{product.images.length}}
6) Traverse Ng-repeat
<div class= "Product row" ng-repeat= "product in Store.products" >
Index $index
<TR ng-repeat= "Item in Items" > <td>{{$index + 1}}</td> <td>{{item.name}}</td> <td>{{item.price | currency}}</td></tr>
7) Using Filters
Format (time, case uppercase, currency currency, limit limitto:3)
Sort (|orderby: "-price")
8) Reference Picture NG-SRC
9) A model can have multiple controllers
var app=angular.module ("Store", []); App.controller ("Storecontroller", function () {this.products = [];}); App.controller ("Tabcontroller", function () {this.tab = 1;});
Ng-class, add a class
<li ng-class= "{active:tab.isSet (1)}" >
11) Select tab page
Ng-click= "Tab.settab (1)" ng-show= "Tab.isset (1)"
ANGULARJS Study Notes