案例:AngularJS案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<meta charset="utf-8">
5
<script src="/js/angular.js1.4.6/angular.min.js"></script>
6
</head>
7
<body ng-app="myApp">
8
9
<table ng-controller="myCtrl" border="1">
10
<tr ng-repeat="x in records">
11
  <td>{{x.Name}}</td>
12
  <td>{{x.Country}}</td>  
13
</tr>
14
</table>
15
16
<script>
17
var app = angular.module("myApp", []);
18
app.controller("myCtrl", function($scope) {
19
  $scope.records = [
20
    {
21
      "Name" : "Alfreds Futterkiste",
22
      "Country" : "Germany"
23
    },
24
    {
25
      "Name" : "Berglunds snabbk",
26
      "Country" : "Sweden"
27
    },
28
    {
29
      "Name" : "Centro comercial Moctezuma",
30
      "Country" : "Mexico"
31
    },
32
    {
33
      "Name" : "Ernst Handel",
34
      "Country" : "Austria"
35
    }
36
  ]
37
});
38
</script>
39
40
</body>
41
</html>
42