Install the Cordova and Ionic Native plugins:
ionic cordova plugin add cordova-plugin-native-spinner
Add this plugin to your app's module
import { SpinnerDialog } from '@ionic-native/spinner-dialog/ngx';
npm install --save @ionic-native/spinner-dialog@beta
import { SpinnerDialog } from '@ionic-native/spinner-dialog/ngx';
providers: [
NativeStorage,
StatusBar,
SplashScreen,
SpinnerDialog
]
providers: [
NativeStorage,
StatusBar,
SplashScreen,
SpinnerDialog
]
Add below code in your component:
constructor(private spinnerDialog: SpinnerDialog) {
...
this.spinnerDialog.show();
}
To hide this spinner you can use below code:
this.spinnerDialog.hide();
No comments:
Post a Comment