-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat(uiSrefActive): nested state and DOM decendant support for ui-sref-active #821
Conversation
…f-active uiSrefActive now takes all decendant uiSrefs into consideration. uiSrefActive also adds a class with "-nested" postfix when a child state of the related uiSrefs becomes active. Closes angular-ui#704.
Not sure if the http://stackoverflow.com/questions/17301572/angularjs-evalasync-vs-timeout |
Not a huge fan of this implementation. It seems like it:
Nope. |
I am a fan of the what is trying to be achieved though, more so than #819. |
Two completely different problems. |
It is? I gathered that they were the same. From the PR description above...
From #819...
I thought they were both solving the same problem—activate a ui-sref link when its child state becomes active—but in two different ways. #819 just activates it, whereas this PR gives it a different active class, e.g. '-nested' postfix. |
In #704 @besnik81 provided his implementation on the same problem, which does not have the three problems @nateabele addressed above. Here is @besnik81's implementation : https://github.com/besnik81/ui-router/compare/patch-2 It does the following:
If my implementation is not good enough, please take a look at @besnik81 's. It's a solution to both #818 (targeting nested-states) and #704 (mentioning DOM hierarchy as well) . |
What is the current status of:
? From what I can see it is still not implemented in master - only the last child uiSref is considered. I can provide a PR that implements this functionality on top of current master if needed. |
@tomekpiotrowski oh you may be right. Sure submit a PR if you like. |
We already have ui-sref-active for fuzzy matches and ui-sref-active-eq for exact. |
This issue has been automatically marked as stale because it has not had This does not mean that the issue is invalid. Valid issues Thank you for your contributions. |
uiSrefActive
now takes all decendantuiSref
s into consideration.uiSrefActive
also adds a class with-nested
postfix when a child state of the relateduiSref
s becomes active.Implemented the consensus we previously met in #704.