Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229693

Show/Hide LoadingController while making network calls

$
0
0

I would like to present LoadingController before making a network calls and dismiss them after the call is complete. I have tried using the below code but am getting the error as

this.loadingProgress : any

constructor(public navCtrl: NavController, 
    public navParams: NavParams,
    public loadingCtrl: LoadingController,
    public networkProvider: NetworkProvider) {
      this.loadingProgress = this.loadingCtrl.create({
        content: 'Please wait...'
      });
  }
saveChanges() {
this.networkProvider.updateChanges(function() {
      this.loadingProgress.dismiss();
    },function(){
      this.loadingProgress.dismiss();
    });
}

undefined is not an object (evaluating '_this.loadingProgress'

can anyone help me with this ?


Viewing all articles
Browse latest Browse all 229693

Trending Articles