W3cubDocs

/Ember.js

RouterService (public)

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

isActive (routeName, models, options) Boolean public

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

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

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

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.

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