I am facing an issue how to handle the default mobile\'s back button which checks the confirmation while exiting from the application, if I pressed the back button there sho
Kinda late to the party... But there is more to back button other than closing the pushed pages, specially for project with several tab pages.
Sometimes a page is pushed NOT into the root page, but in one of the tab page's navCtrl. So we have to check for all of them.
Also, if no page or menu is open, we should circle around the most recently used tabs (similar to Instagram app) and go back to the previous tab. Moreover, we should not go back to each tab more than once (similar to Instagram)
I got inspired by the answers here and created a comprehensive method that handles all necessary features:
The details are in this blog post
A demo code can be downloaded from my github.