列表页下拉数据加载
$scope.loadMore = function() {
$(".dbload").show();
console.log(num)
if(pageindex<num){
pageindex++;
newssever.getissuelist("19",pageindex,pagesize,function(result){
if(result.code==200){
$scope.issuelist = $scope.issuelist.concat(result.data.list);//加载的新数据连接在一起
}
})
}else{
$(".dbload").hide();
}
$scope.$broadcast('scroll.infiniteScrollComplete');
};
模板:
<p class="dbload"><ion-spinner icon="dots" class="spinner-dark"></ion-spinner></p>
<ion-infinite-scroll on-infinite="loadMore()" distance="1%"></ion-infinite-scroll>