@rajesh5129 wrote:
am developing an ionic4 app. after logout I am redirecting to the login page by using this.navController.navigateRoot method. to close the app by clicking the mobile back button I used the following code. it worked for a few days after that now I have to release an updated of this app if click on mobile back button it is not closing the app instead it redirecting to the previous open screen. can anyone help me to solve this issue? ionic version: 5.2.3
code:ionViewDidEnter() {
this.subscription = this.platform.backButton.subscribe(async () => {
navigator[‘app’].exitApp();
});
}ionViewWillLeave() {
this.subscription.unsubscribe();
}
Posts: 1
Participants: 1