Class RouterService

public
Defined in: packages/ember-routing/lib/services/router.js:15
Module: ember

isActive (routeName, models, options) Boolean public

Module: ember
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.

replaceWith (routeNameOrUrl, models, options) Transition public

Module: ember
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.

transitionTo (routeNameOrUrl, models, options) Transition public

Module: ember
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.

urlFor (routeName, models, options) String public

Module: ember
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.

© 2020 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://api.emberjs.com/ember/2.18/classes/RouterService/methods