Skip to content

Feature - Add multi-state support for uiSrefActive #3615

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

Merged

Conversation

jutaz
Copy link
Contributor

@jutaz jutaz commented Jan 21, 2018

This is a quick, interface compliant addition to uiSrefActive to allow for multiple, non-sibling states to activate same class in uiSrefActive. For example:

<div ui-sref-active="{'active': ['owner.**', 'admin.**']}">
  <a ui-sref-active="active" ui-sref="admin.roles">Roles</a>
</div>

Will now be active for when owner.** state is entered, but also admin.**. This makes it much easier to have select parallel states share same class name without resorting to writing boilerplate code to handle that.

Closes #2524

@christopherthielen christopherthielen merged commit 4c8a6d6 into angular-ui:master Jan 30, 2018
@jutaz jutaz deleted the feature/uiSrefActive-arrays branch January 30, 2018 22:37
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

Successfully merging this pull request may close these issues.

2 participants