Back button disappearing on tab views

Hi there,

I have a quite strange issue that I wondered if anyone could help me with.

I have a tab view with 5 tabs, if i perform a series of view changes, the back button randomly disappears.

The issue also happens on this codepen. https://codepen.io/ionic/pen/VLwLOG

If you perform the following steps, it can be reproduced
tab 1 -> subview -> back
tab 2 -> subview -> back
tab 1 -> subview -> back
tab 2 -> subview

On this subview, there is no back button.

Any help is appreciated.

I encounter the same problem too. In fact I can replicate the bug in the ionic documentation page:

http://ionicframework.com/docs/api/directive/ionTabs/

Try:

home -> scientific facts -> back
about -> tabs nav stack -> back
home -> scientific facts -> back
about -> tabs nav stack

3 Likes

Any workaround to this? Incredible this is happening on ionic sample code

I had faced the same issue and I have used below workaround. It works for me.

I have used ionic example
http://ionicframework.com/docs/api/directive/ionTabs/

//Add new controller for NavStack
.state(ā€˜tabs.navstackā€™, {
url: ā€œ/navstackā€,
views: {
ā€˜about-tabā€™: {
templateUrl: ā€œtemplates/nav-stack.htmlā€,
controller: ā€˜NavStackCtrlā€™
}
}
})

//In controller add below code
.controller(ā€˜NavStackCtrlā€™, function($scope,$ionicNavBarDelegate,$ionicHistory) {
$ionicHistory.nextViewOptions({
disableBack: true
});
$ionicNavBarDelegate.showBackButton(true);
});

//Codepen Edit

Try this workaround. I have created new controller.

It also has the same issue, on home the back is lost

image

Iā€™m unable to replicate the issue, could you tell me the steps.

Maybe this behaviour is related to the following issue: