Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70435

Popover dismiss anywhere

$
0
0

@lautarolorenz wrote:

Hello,

I have the following code to close all the popovers that are open, before redirecting users to the login page

  constructor(
    private _popoverCtrl: PopoverController
  ) { }

  logout() {
    this._popoverCtrl.dismiss();
  }

This code only works if there is at least one popover open, but if all are closed, then “dismiss ()” throws the following exception

  ERROR Error: Uncaught (in promise): overlay does not exist

Which is fine, but, how else can I close all the popovers in the logout without knowing exactly if they are or are not open

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70435

Trending Articles



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