案例: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>
8
9
<div ng-app="myApp" ng-controller="customersCtrl"> 
10
11
<table>
12
  <tr ng-repeat="x in names">
13
    <td>{{ x.Name }}</td>
14
    <td>{{ x.Country }}</td>
15
  </tr>
16
</table>
17
18
</div>
19
20
<script>
21
var app = angular.module('myApp', []);
22
app.controller('customersCtrl', function($scope, $http) {
23
    $http.get("/jsjq/angularjs/Customers_JSON.htm")
24
    .success(function (response) {$scope.names = response.records;});

 运行结果 
 北美留学生论坛