ui-sref-active
(directive in module ui.router.state
)
A directive working alongside ui-sref to add classes to an element when the
related ui-sref directive's state is active, and removing them when it is inactive.
The primary use-case is to simplify the special appearance of navigation menus
relying on ui-sref, by having the "active" state's menu button appear different,
distinguishing it from the inactive menu items.
<ANY ui-sref-active> ... </ANY>
<ul>
<li ui-sref-active="active" class="item active">
<a ui-sref="app.user({user: 'bilbobaggins'})" href="/users/bilbobaggins">@bilbobaggins</a>
</li>
<!-- ... -->
</ul>