Infinite-scroll + end of list


#1

when i get to the end of a list, and no new data is appended, the “loadMore” function that is referenced in the on-infinite-scroll attribute of the content, gets called all the time. Would it be possible to pass a simple true/false to the “done” callback to disable the infinite-scroll from triggering a reload? Or are there any other solutions to this problem.


#2

Yeah, I ran into this too and ended up setting a flag in my scope so I could make my loadMore function short-cut return if I wasn’t expecting more data. :stuck_out_tongue:


#3

Is there any engine solution?


#4

See this : https://github.com/driftyco/ionic/issues/711

<ion-content on-infinite-scroll="loadMore()">
  <ion-infinite-scroll ng-if="hasMoreData"></ion-infinite-scroll>
</ion-content>