Skip to content

ui-router-effect / pendingRef

Function: pendingRef() ​

ts
function pendingRef(router): SubscriptionRef<
  | Transition
| undefined>;

Defined in: ui-router-effect/src/transition-refs.ts:63

The pending-transition ref for a router — one per router instance, attached lazily.

It holds the newest transition still in flight, and undefined when none is. The first caller of this or errorRef creates both refs and registers the single onStart hook that feeds them; the transition's promise clears it when that transition settles, whether it succeeds, errors or is aborted, unless a newer one has started. A transition already running on first use counts as pending. Kept out of RouteSnapshot, whose every value is a settled route.

Parameters ​

ParameterType
routerUIRouter

Returns ​

SubscriptionRef< | Transition | undefined>