Devang Mistry
Devang Mistry

Reputation: 593

How to set "dots" loader when API loads a response in ionic 2?

I am in ionic 2 application ,i can add spinner on html page as <ion-spinner name="dots"></ion-spinner> but want to set "dots" Spinner during awaiting time of API response.

current response waiting loader code is :

 fnPresentLoading() {
     this.loading = this.loadingCtrl.create({
     content: 'Please wait...'
     });
   this.loading.present();

anyone have idea ?? Currently it showing default spinner .

Upvotes: 0

Views: 691

Answers (1)

Gabriel Barreto
Gabriel Barreto

Reputation: 6421

You need a spinner parameter and pass 'dots' to it

this.loading = this.loadingCtrl.create({
  spinner: 'dots',
  content: 'Please wait...'
});

Upvotes: 2

Related Questions