编辑下面的代码:【加编码】
<html> <body> <div ng-app="" ng-controller="customersController"> <table> <tr ng-repeat="x in names"> <td>{{ x.Name }}</td> <td>{{ x.Country }}</td> </tr> </table> </div> <script> function customersController($scope,$http) { $http.get("/try/angularjs/data/Customers_JSON.php") .success(function(response) {$scope.names = response;}); } </script> <script src="https://libs.baidu.com/angular.js/1.2.15/angular.min.js"></script> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂