constructor() {
this.indicator = new LoadingIndicator();
}
showLoading(text: string, details: string = '') {
const options: OptionsCommon = {
message: text,
details: details,
progress: 0.65,
margin: 10,
dimBackground: true,
color: '#4B9ED6',
backgroundColor: 'yellow',
userInteractionEnabled: false,
hideBezel: true,
mode: Mode.AnnularDeterminate,
android: {
cancelable: true,
cancelListener: function (dialog) {
console.log('Loading cancelled');
},
},
ios: {
square: false,
},
};
this.indicator.show(options);
}
hide(): void {
this.indicator.hide();
}