案例: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, y) in myObj">
11
  <td>{{x}}</td>
12
  <td>{{y}}</td>  
13
</tr>
14
</table>
15
16
<script>
17
var app = angular.module("myApp", []);
18
app.controller("myCtrl", function($scope) {
19
  $scope.myObj = {
20
    "Name" : "Alfreds Futterkiste",
21
    "Country" : "Germany",
22
    "City" : "Berlin"
23
  }
24
});
25
</script>
26
27
</body>
28
</html>
29