The uiSrefStatus event is emitted whenever an enclosed uiSref's status changes.
The event emitted is of type SrefStatus, and has boolean values for active, exact, entering, and exiting; also has a StateOrNameidentifiervalue.
The values from this event can be captured and stored on a component (then applied, e.g., using ngClass).
A single uiSrefStatus can enclose multiple uiSref.
Each status boolean (active, exact, entering, exiting) will be true if any of the enclosed uiSref status is true.
In other words, all enclosed uiSref statuses are merged to a single status using || (logical or).
A directive which emits events when a paired UISref status changes.
This directive is primarily used by the UISrefActive directives to monitor
UISref
(s).This directive shares two attribute selectors with
UISrefActive
:[uiSrefActive]
[uiSrefActiveEq]
.Thus, whenever a
UISrefActive
directive is created, aUISrefStatus
directive is also created.Most apps should simply use
UISrefActive
, but some advanced components may want to process the SrefStatus events directly.<li (uiSrefStatus)="onSrefStatusChanged($event)"> <a uiSref="book" [uiParams]="{ bookId: book.id }">Book </a> </li>
The
uiSrefStatus
event is emitted whenever an encloseduiSref
's status changes. The event emitted is of type SrefStatus, and has boolean values foractive
,exact
,entering
, andexiting
; also has a StateOrNameidentifier
value.The values from this event can be captured and stored on a component (then applied, e.g., using ngClass).
A single
uiSrefStatus
can enclose multipleuiSref
. Each status boolean (active
,exact
,entering
,exiting
) will be true if any of the encloseduiSref
status is true. In other words, all encloseduiSref
statuses are merged to a single status using||
(logical or).In the above example,
$event.active === true
when eitheradmin.users
oradmin.groups
is active.This API is subject to change.