Route#replaceWith()

replaceWith (name, models) Transitionpublic Defined in packages/ember-routing/lib/system/route.js:1093 Transition into another route while replacing the current URL, if possible. This will replace the current history entry instead of adding a new one. Beside that, it is identical to transitionTo in all other respects. See 'transitionTo' for additional information regarding multiple models. Example App.Router.map(function() { this.route('index'); this.route('secret'); }); App.SecretRout

Route#renderTemplate()

renderTemplate (controller, model) public Defined in packages/ember-routing/lib/system/route.js:1785 A hook you can use to render the template for the current route. This method is called with the controller for the current route and the model supplied by the model hook. By default, it renders the route's template, configured with the controller for the route. This method can be overridden to set up and render additional or alternative templates. App.PostsRoute = Ember.Route.extend({ rend

Route#render()

render (name, options) public Defined in packages/ember-routing/lib/system/route.js:1820 render is used to render a template into a region of another template (indicated by an {{outlet}}). render is used both during the entry phase of routing (via the renderTemplate hook) and later in response to user interaction. For example, given the following minimal router and templates: Router.map(function() { this.route('photos'); }); <!-- application.hbs --> <div class='something-in-the-

Route#refresh()

refreshTransitionpublic Defined in packages/ember-routing/lib/system/route.js:1067 Available since 1.4.0 Refresh the model on this route and any child routes, firing the beforeModel, model, and afterModel hooks in a similar fashion to how routes are entered when transitioning in from other route. The current route params (e.g. article_id) will be passed in to the respective model hooks, and if a different model is returned, setupController and associated route hooks will re-fire as well. An

Route#redirect()

redirect (model, transition) public Defined in packages/ember-routing/lib/system/route.js:1368 A hook you can implement to optionally redirect to another route. If you call this.transitionTo from inside of this hook, this route will not be entered in favor of the other hook. redirect and afterModel behave very similarly and are called almost at the same time, but they have an important distinction in the case that, from one of these hooks, a redirect into a child route of this route occurs:

Route#queryParamsDidChange()

queryParamsDidChange (changed, totalPresent, removed) Booleanprivate Defined in packages/ember-routing/lib/system/route.js:759 This action is called when one or more query params have changed. Bubbles. Parameters: changed Object Keys are names of query params that have changed. totalPresent Object Keys are names of query params that are currently set. removed Object Keys are names of query params that have been removed. Returns: Boolean

Route#queryParams

queryParamsObjectpublic Defined in packages/ember-routing/lib/system/route.js:87 Configuration hash for this route's queryParams. The possible configuration options and their defaults are as follows (assuming a query param whose controller property is page): queryParams: { page: { // By default, controller query param properties don't // cause a full transition when they are changed, but // rather only cause the URL to update. Setting // `refreshModel` to true will cause a

Route#paramsFor()

paramsFor (name) public Defined in packages/ember-routing/lib/system/route.js:347 Retrieves parameters, for current route using the state.params variable and getQueryParamsFor, using the supplied routeName. Parameters: name String

Route#modelFor()

modelFor (name) Objectpublic Defined in packages/ember-routing/lib/system/route.js:1738 Returns the resolved model of a parent (or any ancestor) route in a route hierarchy. During a transition, all routes must resolve a model object, and if a route needs access to a parent route's model in order to resolve a model (or just reuse the model from a parent), it can call this.modelFor(theNameOfParentRoute) to retrieve it. If the ancestor route's model was a promise, its resolved result is return

Route#model()

model (params, transition) Object|Promisepublic Defined in packages/ember-routing/lib/system/route.js:1405 A hook you can implement to convert the URL into the model for this route. App.Router.map(function() { this.route('post', { path: '/posts/:post_id' }); }); The model for the post route is store.findRecord('post', params.post_id). By default, if your route has a dynamic segment ending in _id: The model class is determined from the segment (post_id's class is App.Post) The find method