I am trying to use $state.goIonic (+ AngularJS UI Router) to switch between tabs in an application, but I cannot get it to work with a sub-state (state.substate.subsubstate). In fact, it works great when switching to a sub-state (state.substate).
Here is what I mean: http://codepen.io/anon/pen/Jykmi?editors=101
Pressing the Tab2 button does not work and does not throw an error. However, replacing ng-click="goToState('tabs.tab2.home1')"(line 25) with ui-sref="tabs.tab2.home1"or href="#/tabs/tab2/home1"works fine. Here is an example: http://codepen.io/anon/pen/DIxhC?editors=101
Even use ng-click="goToState('tabs.tab2')"will work, although this is not the target state of the target.
I found other similar questions (like this one and this one ), but I don’t think they had the same problem.
Does anyone know if it should $state.gowork with nested states of the third level ?. Is there a problem in my code?
Thank you in advance. Sincerely,
. Rafa
source
share