How to implement spinner with loading controller in ionic 3?

Niraj picture Niraj · Sep 19, 2017 · Viewed 16.9k times · Source

I want to implement spinner with loading controller in ionic3 . I have implemented simple loading controller . how to do it? thanks in advance.

My current loader

enter image description here

I want something like this

enter image description here

Answer

Mohan Gopi picture Mohan Gopi · Sep 20, 2017
presentLoadingCustom() {
    let loading = this.loadingCtrl.create({
      spinner: 'hide',
      content: `<img src="assets/img/gif.gif" />`,
      duration: 5000
    });

    loading.onDidDismiss(() => {
      console.log('Dismissed loading');
    });

    loading.present();
  }

inside image tag give some gif image and it works fine i have tested it

Output imag