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

Show/Hide LoadingController while making network calls

$
0
0

Hi, @leorjoseph you need to create present loading function,

// For present loading
	presentLoading() {
		this.loadingProgress = this.loadingCtrl.create({
			content: 'Please wait...'
		});
		this.loadingProgress.present();
	}

Now you have start loading on call this.networkProvider.updateChanges() function like this,

saveChanges() {
	this.presentLoading();
	this.networkProvider.updateChanges()
	.then(res => {
	      this.loadingProgress.dismiss();
	}).catch(err => {
	     this.loadingProgress.dismiss(); 
	});
}

Thanks.


Viewing all articles
Browse latest Browse all 229350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>