0
JSON URL : https://api.github.com/users/odetocode
此json url包含另一个json数据的url。我怎么可以从这个网址打到另一个URL来获得数据并将其取到HTML如何从角js的其他json网址获取json url
var app = angular.module('ionicApp', ['ionic']);
app.controller('MainCtrl', function($scope, $ionicModal,$http) {
var url = "https://api.github.com/users/odetocode?callback=JSON_CALLBACK";
$http.jsonp(url) .
success(function(post, status, headers, config)
{ $scope.data = post;
$scope.users= post.data;
$scope.followers_url= post.data.followers_url;
}) .
error(function(data, status, headers, config) {
alert("no data found");
});
});
如何我可以从角JS这个JSON文件打另一个URL。如果我想检查这个用户有多少追随者和追随者。如何我可以做到这一点。
你为什么要出示 –
我不是大喊,我只是问一个问题的帮助.. –
所有封面,在印刷中,大声呼喊 –