controller
-----------------------------------
<script src="../AngularJS/angular.js"></script>
<script>
//获得一个AngularJS应用程序
var app = angular.module("myApp",[]);
//通过应用程序获得一个控制器对象
app.controller("myCtrl",function($scope){
$scope.arr = [1,2,2,3,5];
//$scope.item = {"id":1};
});
</script>
</head>
<body ng-app="myApp" ng-controller="myCtrl">
<ul>
<li ng-repeat="i in arr track by $index">下标为:{{$index}} + 值为:{{i}}</li>
</ul>
</body>
----------------------------------------------
<script src="../AngularJS/angular.js"></script>
</head>
<body ng-app="" ng-init="a=5;x=3;y=2;arr=[1,2,6,3,4];d = false">
输入框:<input type="number" ng-model="a" />
<button ng-click="a = a + 1">点击我</button>
<p>数据是:{{a}}</p>
<br/><br/>
计算机:
<input type="text" ng-model="x" />*
<input type="text" ng-model="y" />=
<span>{{x*y}}</span>
<!-- ng-repeat -->
<ul>
<li ng-repeat="i in arr">{{i}}</li>
</ul>
<!-- ng-if -->
<input type="checkbox" ng-model="d" value="显示或隐藏"/>显示或隐藏
<div ng-if="d">
显示或隐藏
</div>
<input type="checkbox" ng-model="d" value="显示或隐藏"/>显示或隐藏
<div ng-show="d">
显示或隐藏
</div>
<button ng-bind="y">asdfa</button>
</body>
</html>