Class RouterService

public
Module: ember
Since: v2.16.4

The Router service is the public API that provides component/view layer access to the router.

Show:

Module: ember

Available since v2.16.4

routeName
String
the name of the route
models
...Object
the model(s) or identifier(s) to be used while transitioning to the route.
options
Object
optional hash with a queryParams property containing a mapping of query parameters
returns
Boolean
true if the provided routeName/models/queryParams are active

Determines whether a route is active.

Module: ember

Available since v2.16.4

routeNameOrUrl
String
the name of the route or a URL
models
...Object
the model(s) or identifier(s) to be used while transitioning to the route.
options
Object
optional hash with a queryParams property containing a mapping of query parameters
returns
Transition
the transition object associated with this attempted transition

Transition into another route while replacing the current URL, if possible. The route may be either a single route or route path:

See Route.replaceWith for more info.

Module: ember

Available since v2.16.4

routeNameOrUrl
String
the name of the route or a URL
models
...Object
the model(s) or identifier(s) to be used while transitioning to the route.
options
Object
optional hash with a queryParams property containing a mapping of query parameters
returns
Transition
the transition object associated with this attempted transition

Transition the application into another route. The route may be either a single route or route path:

See Route.transitionTo for more info.

Module: ember

Available since v2.16.4

routeName
String
the name of the route
models
...Object
the model(s) or identifier(s) to be used while transitioning to the route.
options
Object
optional hash with a queryParams property containing a mapping of query parameters
returns
String
the string representing the generated URL

Generate a URL based on the supplied route name.