Class RouteInfoWithAttributes public
A RouteInfoWithAttributes
is an object that contains
metadata, including the resolved value from the routes
model
hook. Like RouteInfo
, a RouteInfoWithAttributes
represents a specific route within a Transition.
It is read-only and internally immutable. It is also not
observable, because a Transition instance is never
changed after creation.
Methods
find (callback, target*) : Object public
Defined in packages/@ember/-internals/routing/lib/system/route-info.ts:84
- callback
- Function
the callback to execute
- target*
- Object
optional target to use
- returns
- Object
Found item or undefined
Allows you to traverse through the linked list
of RouteInfo
s from the topmost to leafmost.
Returns the first RouteInfo
in the linked list
for which the callback returns true.
This method is similar to the find()
method
defined in ECMAScript 2015.
The callback method you provide should have the following signature (all parameters are optional):
function(item, index, array);
item
is the current item in the iteration.index
is the current index in the iteration.array
is the array itself.It should return the
true
to include the item in the results,false
otherwise.Note that in addition to a callback, you can also pass an optional target object that will be set as
this
on the context.
Properties
attributes public
Defined in packages/@ember/-internals/routing/lib/system/route-info.ts:54
This is the resolved return value from the route's model hook.
child public
Defined in packages/@ember/-internals/routing/lib/system/route-info.ts:76
A reference to the child route's RouteInfo.
This can be used to traverse downward to the
leafmost RouteInfo
.
localName public
Defined in packages/@ember/-internals/routing/lib/system/route-info.ts:21
The final segment of the fully-qualified name of the route, like "index"
metadata public
Defined in packages/@ember/-internals/routing/lib/system/route-info.ts:61
Will contain the result Route#buildRouteInfoMetadata
for the corresponding Route.
name public
Defined in packages/@ember/-internals/routing/lib/system/route-info.ts:14
The dot-separated, fully-qualified name of the route, like "people.index".
paramNames public
Defined in packages/@ember/-internals/routing/lib/system/route-info.ts:38
The ordered list of the names of the params
required for this route. It will contain the same
strings as Object.keys(params)
, but here the order
is significant. This allows users to correctly pass
params into routes programmatically.
params public
Defined in packages/@ember/-internals/routing/lib/system/route-info.ts:28
The values of the route's parameters. These are the same params that are received as arguments to the route's model hook. Contains only the parameters valid for this route, if any (params for parent or child routes are not merged).
parent public
Defined in packages/@ember/-internals/routing/lib/system/route-info.ts:68
A reference to the parent route's RouteInfo.
This can be used to traverse upward to the topmost
RouteInfo
.
queryParams public
Defined in packages/@ember/-internals/routing/lib/system/route-info.ts:48
The values of any queryParams on this route.