Ionic backing in view history in a different way

Hi,
We’ve run into a small problem with our new Ionic app (which otherwise is ready to deploy). The app consists of multiple tabs, and each tab can open subviews. The hierarchy of the app is like this:

`tab1.home

  • tab1.sub1
    – tab1.sub2
    — tab1.sub3
    tab2.home
  • tab2.sub1`

And just to explaing tab1.sub1 is the view which opens up tab1.sub2. If i press back from tab1.sub2, the view tab1.sub1 should be shown.

In tab2.sub1 we have a link which points directly to tab1.sub3. If the user presses Back from tab1.sub3 then, we get pointed back to tab2.sub1. This is the problem. When we press Back in tab1.sub3 we want to show the previous view within that tab. So if tab1 was focused on tab1.home, when we press Backin tab1.sub3 (opened from tab2.sub1) we want to be taken to tab1.home. How can we achieve this? Right now we are using ionicHistory.back(), but what we actually want is to just go up one level in that tab’s hierarchy.