Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49083

Ionic 5 navigator['app'].exitApp();

$
0
0

Good afternoon, I would like to know how I could fix the issue of closing the session in ionic 5 with capacitor, I am placing the following function and it has not worked for me, it does not enter the foreach.

backButtonEvent() {

this.platform.backButton.subscribeWithPriority(1, () => {

    this.routerOutlets.forEach((outlet: IonRouterOutlet) => {

        if (outlet && outlet.canGoBack()) {

            outlet.pop();

        } else  {

             navigator['app'].exitApp();

        }

    });

});

}

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 49083

Trending Articles



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