How to always show parent state every click tabs menu


#1

i have menu tabs news, like in web first show a list of new news, then click read more, then show detail news, when i click other menu tabs like promo, after that i click back news tab the menu show still show a content detail news, how to every i click menu tabs show parent state. thanks before.


#2

please every one help me…thanks, sory my english bad


#3

why no one reply this ?


#4

Because ion-tab automatically remember last state you were in. So I think you should add a function in the tab button, for example ng-click="parent"
and in the controller:
parent = function () {
state.go(“parentstate”);
}


#5

thanks nntien… i put in every parent state ionic clear history, absolutely solved…


#6

Hallo! How you did that? I am new in Ionic and faced with same problem