Class RouterService
publicThe Router service is the public API that provides component/view layer access to the router.
isActive (routeName, models, options) Boolean public
Defined in packages/ember-routing/lib/services/router.js:196
- 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
Defined in packages/ember-routing/lib/services/router.js:158
- 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
Defined in packages/ember-routing/lib/services/router.js:128
- 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
Defined in packages/ember-routing/lib/services/router.js:179
- 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.