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

Ionic 4 mobile back button issue

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



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