0

Im working with the Ionic-Framework and AngularJS. If you create the Ionic sidemenu sample project:

ionic start myApp sidemenu

You will get a small example application which shows my exact problem. You can try out the behaviour here: Plunker

If you open up the Side-Menu and navigate to several locations everything is put on the Back-Stack. How can I prevent that behaviour for special pages?

For our example lets say i always want to completely delete the Back-Stack when the "playlists" page is called. My Application will run on mobile devices only and its very untypical to be able to press the back button in the main menu and be navigated to the last opended page.

I want Angular UI-Routing to simulate the Android Backing behaviour.

How can i achieve that?

Another problem is that the hardware back button seems to work different than the back button of the navigation bar. You can see that in the browser. If you navigate to a link from the side menu there wont appear a back button in the navigation bar (Like it should be!). But when you press the browser back button, suddenly a back button in the navigation bar appears (very uncool!). How to prevent that?

Mulgard
  • 9,877
  • 34
  • 129
  • 232
  • Are you looking for: http://stackoverflow.com/questions/26441698/remove-page-from-history-so-back-will-work-properly ? You can disable the back button function with it. – Praval 'Shaun' Tirubeni May 27 '15 at 07:23
  • but that only disables the back button. I dont want any views to be in the back-stack when i navigate to my home screen or any screen which is in my sidemenu – Mulgard May 27 '15 at 07:30
  • and another problem seems to be that the hardware back button behaves different from the back button in the navigation bar. in the browser theres a similar difference between the browser back button and the navigation bar back button. – Mulgard May 27 '15 at 07:32
  • 1
    Mmmm, maybe try this: http://forum.ionicframework.com/t/is-there-a-way-to-clear-out-the-nav-router-history-and-prevent-a-back-button/356/5. There is a post where you can remove the history using rootscope. – Praval 'Shaun' Tirubeni May 27 '15 at 07:48
  • the link you provided does not contain informations how to "really" delete the back-stack. there are just some workarounds or suggestions. no real conclusions. – Mulgard May 27 '15 at 17:13

0 Answers0