infinite scroll in ionic
<ion-infinite-scroll ng-if="canWeLoadMoreContent()" on-infinite="getOrderHistory()" distance="2%"> </ion-infinite-scroll>
ion-infinite-scroll calls canWeLoadMoreContent() only the first time page is loaded and I can go on with that.
However, I need ion-infinite-scroll to call canWeLoadMoreContent() as soon as the state is loaded. It calls the function only first time and then on further scrolls.
For canWeLoadMoreContent() to be called again, I need to refresh it in browser which ofcourse can not work in android browsers.
How do I reinitialize infinite scroll every time?
I think you should add $scope.$broadcast('scroll.infiniteScrollComplete'); in your getOrderHistory() method.
You can check the example on CodePen.