我想问为什么我的第二个ajax调用没有得到任何数据..
这是我的Ajax代码:
$scope.setArticleList = function(page){
if(page == $scope.paging.page){
$http({
method : 'POST',
url : API_URL + "article/get/mainArticleView/" + page + "/" + $scope.paging.size,
data : $.param($scope.active_filter),
headers: {'Content-Type': 'application/x-www-form-urlencoded'}
}).success(function(response_article){
if (page == $scope.paging.page) {
$scope.article_list = response_article.data_article;
$scope.paging.total = response_article.total_page;
}
});
}
$http({
method : 'GET',
url : API_URL + "article/get/mainCategoryView"
}).success(function(response_category){
$scope.category_list = response_category.data_category;
console.log(response_category);
});
};
article_list
的Ajax调用获取response.data
,但没有来自category_list的数据..
我检查过查询不是空的。