Class Transition
publicA Transition
is a thennable (a Promise
-like object) that represents an
attempt to transition to another route. It can be aborted, either explicitly
via abort
or by attempting another transition while a previous one is still
underway. An aborted transition can also be retry()
d later.
A Transition
is not user-constructible; the only legal way to get one is in
a Route
hook or a RouterService.on()
callback. However, you can import the
type by using import type
syntax with TypeScript or import()
in JSDoc
comments.
data public
Defined in packages/@ember/routing/transition.ts:37
Custom state can be stored on a Transition
's data
object. This can be
useful for decorating a Transition
within an earlier hook and shared with a
later hook. Properties set on data
will be copied to new transitions
generated by calling retry
on this transition.
debugPreviousTransition
Defined in packages/@ember/routing/transition.ts:186
In non-production builds, this property references the Transition
that
this Transition
was derived from or undefined
if this transition did not
derive from another. In production builds, this property will not be present.
from public
Defined in packages/@ember/routing/transition.ts:148
This property is a RouteInfo
object that represents where transition
originated from. It's important to note that a RouteInfo
is a linked list
and this property represents the head node of the list. In the case of an
initial render, from
will be set to null
.
promise public
Defined in packages/@ember/routing/transition.ts:25
The Transition
's internal Promise
. Calling .then
on this property is
that same as calling .then
on the Transition
object itself, but this
property is exposed for when you want to pass around a Transition's promise,
but not the Transition object itself, since Transition object can be
externally abort
ed, while the promise cannot.
to public
Defined in packages/@ember/routing/transition.ts:140
This property is a RouteInfo
object that represents where the router is
transitioning to. It's important to note that a RouteInfo
is a linked list
and this property represents the leafmost route.