Problem: if I exit the current ion-viewone when the callback has on-finitenot completed processing, the callback on-infinitewill begin to receive calls in a loop until the application closes, even if I am not in the place where I was installed ion-infinite-scroll.
It's hard to reproduce, but I found a way to easily manifest it. Set up an infinite callback in the view.
<ion-infinite-scroll
immediate-check="false"
on-infinite="loadMore()"
distance="5%">
</ion-infinite-scroll>
And then use $timeoutto artificially slow down the function loadMore()to 2 seconds. Something like that:
$scope.loadMore = function() {
console.log("Loading more...");
$timeout(function() {
$scope.$broadcast('scroll.infiniteScrollComplete');
}, 2000);
};
, loadMore() "" 2 , . , , "Loading more..." 2 . , loadMore() .
. , ( , ). infiniteScrollComplete $apply(), digest already in progress. $timeout(...,0) $apply(), , , , loadMore() , , loadMore() .
?
: . . , , . 1.7.16.