Skip to content

ui-router-effect / RouteSnapshot

Interface: RouteSnapshot ​

Defined in: shared/route-snapshot/src/route-snapshot.ts:19

The router's current state as one immutable value, for a reactive cell to 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 ​

PropertyModifierTypeDescriptionDefined in
currentreadonly| StateDeclaration | undefinedThe current state declaration (globals.current).shared/route-snapshot/src/route-snapshot.ts:21
paramsreadonlyRawParamsThe current parameter values (globals.params), replaced per transition.shared/route-snapshot/src/route-snapshot.ts:24
transitionreadonly| Transition | undefinedThe transition that produced this snapshot; undefined before the first.shared/route-snapshot/src/route-snapshot.ts:27

Methods ​

includes() ​

ts
includes(stateOrName, params?): boolean;

Defined in: shared/route-snapshot/src/route-snapshot.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 ​

ParameterType
stateOrNameStateOrName
params?RawParams

Returns ​

boolean