Side menu behaves like tabs

Hi,
I made a complete example of how to implement a side menu which behaves like a tabs bar. (So each side menu item has its own history stack)

http://cdpn.io/hcykA

Comments are welcome ! :slight_smile:

2 Likes

Unfortunately the nested view isn’t working. Go one step into the nested view, select another “tab” and then go back and you’ll see you’re back at the root. As far as I can find, there’s no way around this but to add some logic to ionic. I added the following to the ionTabNav directive’s compile function:

    $scope.$on( "tab.select", function(event, tab) {
      if($scope.title === tab) {
        $scope.selectTab(event);
      }
    });

As You can see I’ve introduced an event called “tab.select” which can be broadcast on $rootScope. You simply send the title of the tab you’d like to show.

Hope it works!