ionInfiniteScroll source code:
$scope.$on('scroll.infiniteScrollComplete', function() {
$element[0].classList.remove('active');
$timeout(function() {
scrollView.resize();
}, 0, false);
infiniteScrollCtrl.isLoading = false;
});
But in my controller, it doesn’t work.
<a href="javascript:;" ng-click="complete()">Manaul Complete</a>
starter.controller('Home', function($scope) {
$scope.complete = function(){
$scope.$broadcast('scroll.infiniteScrollComplete');
}
})
But the ionInfiniteScroll callback function can work:
<ion-infinite-scroll ng-if="!noMoreItemsAvailable" on-infinite="onInfiniteScroll()" distance="5%">
</ion-infinite-scroll>
$scope.onInfiniteScroll = function() {
...
$scope.$broadcast('scroll.infiniteScrollComplete');
}