Greetings!
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!
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:
ionic start SideMenu sidemenu
- replaced
menu-close
in menu.html with toggle-menu="left"
on each list item
=> That resulted in what I described above - no success.
- 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. =.=
hello friends when i am select the page in my side menu and go back with the help of mobile devide button but i am not able to go back on home page any idea to resolve this ishu plese share solution .
thanks