lit-ui-router-effect / RouteSnapshot
Interface: RouteSnapshot
Defined in: route-ref.ts:19
The router's current state, as a value a SubscriptionRef can hold.
Taken once per successful transition; every field, includes() included, answers for that moment. A selector asking during a later transition gets the settled answer, not the in-flight one.
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
current | readonly | | StateDeclaration | undefined | The current state declaration (globals.current). | route-ref.ts:21 |
params | readonly | RawParams | The current parameter values (globals.params), replaced per transition. | route-ref.ts:24 |
transition | readonly | | Transition | undefined | The transition that produced this snapshot; undefined before the first. | route-ref.ts:27 |
Methods
includes()
ts
includes(stateOrName, params?): boolean;Defined in: route-ref.ts:34
StateService.includes evaluated against this snapshot: is the state (or glob pattern, e.g. 'admin.**') included in the snapshot's active state, with these parameter values?
Parameters
| Parameter | Type |
|---|---|
stateOrName | StateOrName |
params? | RawParams |
Returns
boolean