Sidemenu clear history



I am using the sidemenu seed project and have issues with the back navigation behaviour. I was expecting every view from the side menu items to act as a root view. So no matter in which one of the root views the user is, once she clicks the hardware back button (android device), the app closes. What currently happens is navigating back to the other side-menu pages previously opened and exiting only once the history stack is empty. Using nav-clear menu-close on each menu item did not solve the issue. Neither $ionicHistory.nextViewOptions did. Any ideas is this behaviour “by design” and how to make it work as expected? After 3 days of researching I still haven’t found a working solution.

Thank you in advance!


it happend with me.



and use


This solves the issue


Thank you for your reply but it did not solve the issue. The hardware back button still navigates back in the history stack and now even the root pages have navbar back button arrow. From what I can observe, the history stack is not cleared when going to a root page from the side menu items.

How I tested your suggestion:

  1. ionic start SideMenu sidemenu
  2. replaced menu-close in menu.html with toggle-menu="left" on each list item
    => That resulted in what I described above - no success.
  3. Tried adding nav-clear to each list-item
    => Still no success


Solved the issue. Thank you @Sumeet123 once again for trying to help. Looks like others don’t find this navigation behaviour annoying. =.=