Ionic doesn't set current state properly when navigating to nested tab


#1

I have this setup:

  • tab1
  • tab2
  • tab2.1
  • tab2.2

Let’s say I start with tab1, then go to tab2, then tab2.2, then go back to tab1. Now, if I click tab2, Ionic shows tab2.2, the last active child tab. This is correct and expected.

The problem is the current ui-router state ($state.current.name) is internally set to tab2, instead of tab2.2. (And the browser also show the URL of tab2, not tab2.2.)

Unfortunately, this breaks my code, which requires knowing the current tab’s state name (not its parent tab’s).

Can anyone suggest a way to fix this?


#2

i have got the same problem,can anyone give a solution