[solved] Go Back to previous view when user clicks on menu-element

Hello together,
this time I have a specific questions for the ionicHistory and the go-Back possibility.

What I want to do:

  • I have multiple views (Start, Infos, …). Inside those views are links to other views (with ui-sref). When I click on such an “inside”-link I get an back Button.

Now my special case:

  • When I am in such an inside-view and open the menu, and click on a menu-element. I get to the next view, but there is no back button shown.

I know, that is caused bei the ui-sref and the ionicHistory-Stack. So I log the IonicHistory-Stack via viewHistory() and there is noch backView or something after the special case.

Does anybody has an idea how I can get that working?

I already find this here: How can I use $ionicHistory to go back 2 views?. But that wont work, because the view is not in the backView of the viewHistory-object.

Thanks for every suggestion.

My menu is build like this:

    <ion-item menu-close ui-sref="app.infos">
      <i class="iconion-ios-home"></i>

OK, for anybody who has the same issue. It is not a bug it is a feature.

The menu-close attribute resets the history. Something like that could help, but anyway this case is closed for me:

1 Like