$state.go doesn't redirect to given path


#1

Hey, i’ve got a view that’s outside of my tabs, now when i try to redirect from that view to a tab i get redirected to the wrong tab. i’ve made a codepen to show you what i mean since i don’t really know how to explain it well see the logs i create in the console

See the Pen Blank Starter - Nightly by Sjoerd de Wit (@sjerd) on CodePen.


#2

add the tab-index to your state urls
and use “select(index)” of http://ionicframework.com/docs/api/service/$ionicTabsDelegate/

to activate correct tab, after go-back. btw. if you want to go only one step back in history without any special cases -> $window.history.back() will do it


#4

I have another problem, when you click on back button the state is changing to tab.volgend (which is right) but after this is going to tab.alert state… so I’m trying to figure out why is this second redirect happening.

Extract from console.log when clicking back button:

The second transition is made by the ionic framework, I have put a breakpoint and check the callstack, check this captures:

1- first call when back is clicked:

2- The ionic framework detects a change in the url and… fires the second transition:

Why does the ionic framework force these transitions?


#5

Issue resolved in nightly build, great work ionic team!