我在 Chrome 中收到一条错误消息,说 Error fetching feed: Undefined, 0. 有什么建议吗?
我的角度代码是:
// Begin SimpleController, with data
demoApp.controller('SimpleController', function($scope, $http){
var url = "http://www.grabapper.com/api/v1/iosapps.json";
$http.jsonp(url).
success(function(data,status,headers,config){
$scope.feed = {
title: 'DailyJS',
items: data
};
}).
error (function(data,status,headers,config){
console.error('Error fetching feed:', data,status);
});
});
// End SimpleController
all.html:
<li ng-repeat="item in feed.items">
{{item.name}}
</li>