1
votes

I'm developing an app based on ion-tabs. I want to freely use$ionicHistory.goBack() , but at the moment if I go to another tab I have $ionicHistory cleared (reference to previous view is undefined).

Is there a way to disable history clear on each tab change? I need something that also maintain android back button working correctly.

Thank you

1

1 Answers

0
votes

Use $state.go() instead of $ionicHistory.goBack(). $ionicHistory.goBack() pops the current state from state stack while $state.go() keeps the current state and pushes the new one