Navigating to another state makes back button disappear


#1

Hello, this problem is present since i started using ionic a few months ago.

So, that’s what i have:

A right sidemenu
The content of that sidemenu is a tabbed view

If you navigate to another state, from let’s say

sidemenu_tabs.tab1 -> other_state

The back button doesen’t appear.

To explain better

  • state1
  • state2
  • menu
  • tab1
  • tab2
  • tab3
  • tab4

Navigating from tabX (1,2,3,4) to state 1 or state 2 hides the back button (and no switching animation is played).

Thank you,
Krzysz.


#2

It seems to me that this is the documented behavior of tabs history


#3

This is would force the back button to appear, you should place it into your tab controller:

$scope.$on('$ionicView.beforeEnter', function (event, viewData) {
    viewData.enableBack = true;
  });

#4

Thanks it worked after i’ve put it in the incriminated controller (where i was switching to) instead of the tab controller!

Thumbs up!