<!DOCTYPE html><html><head><meta charset="utf-8"><script src="http://cdn.static.runoob.com/...</head><body><div ng-app="myApp" ng-controller="customersCtrl"><ul><li ng-repeat="x in names">{{ x.Name + ', ' + x.Country }}</li></ul></div><script>var app = angular.module('myApp', []);app.controller('customersCtrl', function($scope, $http) {$http.get("http://www.runoob.com/try/angularjs/data/Customers_JSON.php").success(function (response) {$scope.names = response.records;});});</script></body></html>
AngularJS怎么實現(xiàn)跨域取數(shù)據(jù)
30秒到達(dá)戰(zhàn)場
2018-09-07 13:09:11