Ionic 4 Refresher.complete is not a function

when pull to scroll
data get successfully but refresher not complete

<ion-refresher slot=“fixed” (ionRefresh)=“doRefresh($event)”>

file.ts

GetAllData(){
this.SnaptService.getData(“members”,"").subscribe((res)=>{
this.members = res;
});

this.SnaptService.getData("vipmembers","").subscribe((res)=>{
  this.vipmembers = res;
});    
 
this.SnaptService.getData("mostviewmembers","").subscribe((res)=>{
  this.mostview = res;
}); 

}

doRefresh(refresher){
console.log(" doRefresh ");
this.GetAllData();
refresher.complete();
}

1 Like

The API changed a bit in the Ionic 4 - see here: https://ionicframework.com/docs/api/refresher

Now instead of refresher.complete() you need to call event.target.complete().

doRefresh(event){
    console.log(" doRefresh ");
    this.GetAllData();
    event.target.complete();
}
2 Likes

thank u
it’s worked :smile: