doInfinite(infiniteScroll) {
console.log('Begin async operation');
setTimeout(() => {
for (let i = 0; i < 5; i++) {
if(this.items.length < 20){
this.items.push( this.items.length );
infiniteScroll.complete();
}else{
infiniteScroll.enable(false);
}
}
console.log('Async operation has ended');
}, 500);
}
ionViewDidLoad(){
this.http.get('assets/data/nearby.json')
.subscribe(data=>{
console.log(data)
console.log(data.json())
this.lists = data.json()
},error=>{
console.log(error)
});
}
}
MM们
相关分类