Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with ui-sref-active and nested states #2908

Closed
adamk33n3r opened this issue Aug 5, 2016 · 1 comment
Closed

Issue with ui-sref-active and nested states #2908

adamk33n3r opened this issue Aug 5, 2016 · 1 comment

Comments

@adamk33n3r
Copy link

In the case of a state hierarchy like parent -> child -> [grandchild1, grandchild2] if you call $state.go('.grandchild2') in the child controller and you navigate directly to parent.child the ui-sref-active for the grandchild is NOT activated. If, however, you call $state.go('.child.grandchild2') in the parent controller and you navigate directly to parent the ui-sref-active for the grandchild IS activated.

This issue is not present in v0.3.1.

In the plunker you can test the different flows by commenting/uncommenting the go calls in the controllers and clicking on the appropriate links. I also included a commented out script reference in index.html to v0.3.1 so you can see that it used to work.

One thing I found is that if you wrap the $state.go call in the child controller with a timeout it works as expected.

Plunker: http://plnkr.co/jQ5ynztNFTppQeUEkeoO/

@christopherthielen
Copy link
Contributor

Thanks, definitely looks like a regression in 1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants