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