This is my first ionic application.
I am adding an infinite scroll to my ionic page:
doInfinite(infiniteScroll) {
//this.getOrders(0, this.pageSize);
setTimeout(() => {
for (let i = 0; i < this.length; i++) {
this.getOrders(0, this.pageSize++);
this.orders.push(this.orders[i]);
}
infiniteScroll.target.complete();
}, 500);
}
And here is the html:
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content loadingText="Loading Data">
</ion-infinite-scroll-content>
</ion-infinite-scroll>
The problem is when scrolling down and all data is loaded, the loader is still visible and request is made to database.
No errors at the console.