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

ui-sref-active should be able to match on nested child states. #818

Closed
noeticpenguin opened this issue Jan 25, 2014 · 1 comment · Fixed by #927
Closed

ui-sref-active should be able to match on nested child states. #818

noeticpenguin opened this issue Jan 25, 2014 · 1 comment · Fixed by #927

Comments

@noeticpenguin
Copy link

Feature Request:

Given a state 'foo' and child state 'foo.bar' ui-sref-active should be able to maintain it's 'active' status on the parent state, while the child state is in view.

plnkr demonstrating usefulness:
http://plnkr.co/edit/UaBV3DPwR6qt3KLTjQ0r?p=preview

Use navigation menu to hit manage flights
Note two flights F-0000, F-0001 neither of which are listed as "active"
Click on one of them.
Border is drawn around selected tab.
Now click on the "search w/ Criteria" button inside the active state.
The "active" state is lost on the selected tab, even though the displayed state is a child of the tab.

Discussed with Caitp in irc.

caitp added a commit to caitp/ui-router that referenced this issue Jan 25, 2014
This issue provides support for optionally counting a link as active if any of its child states are
active and parameters match.

Closes angular-ui#818
@caitp
Copy link
Contributor

caitp commented Jan 25, 2014

It's a pretty simple fix, doesn't break any tests and afaik shouldn't be a breaking change. We can talk about the attribute name, I'm not sure what the best one would be, but this can probably make it into the tree in a few days.

timkindberg added a commit that referenced this issue Mar 4, 2014
To limit activation to target state use new ui-sref-active-equals directive'

Breaking Change: Since ui-sref-active now activates even when child states are active you may need to swap out your ui-sref-active with ui-sref-active-equals, thought typically we think devs want the auto inheritance.

Fixes #818
timkindberg added a commit that referenced this issue Mar 4, 2014
To limit activation to target state use new ui-sref-active-equals directive'

Breaking Change: Since ui-sref-active now activates even when child states are active you may need to swap out your ui-sref-active with ui-sref-active-equals, thought typically we think devs want the auto inheritance.

Fixes #818
timkindberg added a commit that referenced this issue Mar 10, 2014
To limit activation to target state use new ui-sref-active-equals directive'

Breaking Change: Since ui-sref-active now activates even when child states are active you may need to swap out your ui-sref-active with ui-sref-active-equals, thought typically we think devs want the auto inheritance.

Fixes #818
timkindberg added a commit that referenced this issue Mar 10, 2014
To limit activation to target state use new `ui-sref-active-eq` directive

Breaking Change: Since ui-sref-active now activates even when child states are active you may need to swap out your ui-sref-active with ui-sref-active-eq, thought typically we think devs want the auto inheritance.

Fixes #818
peterhgombos pushed a commit to bdo-labs/ui-router that referenced this issue Aug 8, 2014
To limit activation to target state use new `ui-sref-active-eq` directive

Breaking Change: Since ui-sref-active now activates even when child states are active you may need to swap out your ui-sref-active with ui-sref-active-eq, thought typically we think devs want the auto inheritance.

Fixes angular-ui#818
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants