HI all ! I’m very new to typescript and ionic 2 and I’m trying to create simple page with ion-infinite-scroll which get data from SQLite. Could anyone help please how to create correctly offset,limit ?
doInfinite(infiniteScroll) {
console.log('Begin async operation');
setTimeout(() => {
this.items = this.load(); //Array<Object>;
console.log('Async operation has ended'); infiniteScroll.complete(); }, 500); }
load(){
this.service.get(this.sid).then(data=>{ for(let i = 0; i < data.res.rows.length; i++) { this.models.push(data.res.rows.item(i)); } });
return this.models;
}