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 ?