My problem:
I have a checkbox above the list, which shall filter the list (or better: clear the list and start reloading with some filter option)
So when the checkbox is clicked, I’m emptying the list array and set hasMore to true again. However, infinite-scroll is not triggered.
If I do not empty the list, but add some dummy objects (enough that it exceeds the page by a few px) infinite-scroll is triggered correctly, but this is not a solution.
Any idea how to force infinite-scroll to work again?
I have a similar problem. I also have a textbox above the list. When I reach the end of a list, the infinite-scroll not work for the next list of the new search, only showed the first page. If I search before reach the end of current list the infinite-scroll its works well.
does Your hasMore value properly updated to stop the scroll. I have successfully implemented with this logic. I can can help you if codepen your problem
Which restricts the directive to “Tag Name” (<ion-inifinite-scroll>). It does not allow attribute name (<div infinite-scroll="...">).
I have no idea why you think this should work.
After resetting the data array you can just fire the scroll complete event again, and it will start loading:
$scope.reset = function reset() {
// reset the data model, reset the ng-if condition:
$scope.upcoming = [];
$scope.hasMoreUpcoming = true;
// broadcast complete event, which will trigger reloading:
$scope.$broadcast('scroll.infiniteScrollComplete');
}