Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

Force close any open ionic popup

$
0
0

Hi is there any way to force close any open ionic popup? I know I can assign a variable to it and call close on that variable, but I wonder if there is a way to close any open popup without having to track it?

The specific use case is that I am trying to handle the case when the app goes to background and resumes. In this case, any open popup remains open and when I resume I switch screens to ask the user for a PIN and then go back to the old screen -- but the popup keeps floating on top during this transition. Different views have multiple popups and some views have more than one - so tracking which one may be open and closing only that one is not convenient.

The solution I have now is I've defined $rootScope.zmPopup which all my popups use and in app.js I have a "onPause" that does if ($rootScope.zmPopup) $rootScope.zmPopup.close() which works but uses rootScope

Thanks


Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>