我在显示jsonp请求中的内容时遇到问题:
function ContentCtrl($scope, $http) {
"use strict";
$scope.url = 'domain/api/getposts/?auth_key=s2mEus39R296M5F6n343A3dh9c62f7cm&custom_post=updates&callback=JSON_CALLBACK';
$scope.content = [];
$scope.fetchContent = function() {
console.log($scope.url);
$http.get($scope.url).then(function(result){
$scope.content = result.data;
});
};
$scope.fetchContent();
}
我的html模板是:
<div id="container" ng-controller="ContentCtrl">
<content-item ng-repeat="item in content" content="item">{{item.ID}}
</content-item>
</div>
我做错了吗?真的很感激你的帮助...