So I have a loading spinner currently working well in my Ionic 2 app. I can even dismiss it after a certain time and display a custom spinner popup. However, what I would like to implement is for the ability of the second popup spinner to be dismissed by the user - This would be useful for when the app takes a long time or hangs on loading certain things.
I have tried adding a (click) event to the popup but keep getting a "sanitising HTML stripped some content" warning and the popup remains unresponsive.
Is there a way I can get a loading popup to be dismissed on request?
I use this to remove any overlays present on the screen.
let activePortal = ionicApp._loadingPortal.getActive() ||
this.ionicApp._modalPortal.getActive() ||
this.ionicApp._toastPortal.getActive() ||
this.ionicApp._overlayPortal.getActive();
if (activePortal) {
activePortal.dismiss();
}
I generally use it with a back button listener so the user can remove the overlays on back press in android.