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

Switching to another tab inside the tab-view does not update the tab (heading) #1

Closed
fdomig opened this issue Oct 31, 2014 · 4 comments

Comments

@fdomig
Copy link

fdomig commented Oct 31, 2014

I have two tabs and inside on of the tabs I am linking to the other tab (state) which does not update the tab heading.

I created a jsfiddle to explain the behaviour more easily.

Maybe I am doing it wrong but this seems to be not the desired effect.

@rpocklin
Copy link
Owner

rpocklin commented Nov 1, 2014

Thanks for the helpful fiddle. You're doing it right, it should certainly behave that way. Interestingly if I hit F5 then the tabs appear correctly highlighted :(

This directive delegates to ui-router for its nested routing algorithm,
from what I can tell this is an issue (or by design) in ui-router see angular-ui/ui-router#582

It comes down to ui-router not refreshing / updating the parent route on nested routes.

Could possibly force the update by watching a shared variable on the scope.

@rpocklin
Copy link
Owner

rpocklin commented Nov 1, 2014

I've got a version of this updating the parent tab, but it involves watching $rootScope.$on('$stateChangeSuccess') i'll look at it more tomorrow.

@rpocklin rpocklin reopened this Nov 5, 2014
@rpocklin
Copy link
Owner

rpocklin commented Nov 5, 2014

Can you take a look and confirm the issue is fixed with this update?

http://rpocklin.github.io/ui-router-tabs/example/index.html

@fdomig
Copy link
Author

fdomig commented Nov 6, 2014

This fixes this issue. Thank you.

@fdomig fdomig closed this as completed Nov 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants