angularjs - navigate across history stacks ionic ion-tabs -
i have problem have application has 4 ion tabs of each have own history stack. having problem navigate tab => b, tab b moved inner page of tab b, there no way of navigating , resetting history on tab b when go tab can reset tab b's history root of tab b.
if right, want clear navigation stack within tab when changing tabs? have @ following approach:
<ion tab>
has callback when deselecting. can use call function in controller clears history. html page looks example this:
<ion-tab title="xyz" href="#/tab/whatever" on-deselect="clearhistory()"> ... </ion-tab>
and in controller define following coresponding function:
.controller('testctrl', function($scope, $ionichistory) { $scope.clearhistory = function() { $ionichistory.clearhistory(); } })
this clears navigation stack of current tab before leaving. tested ionic tabs starter templates , worked me.
i hope issue. if not, leave me comment , again it.
Comments
Post a Comment