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 example usage of this method is re-querying the server for the latest information using the same parameters as when the route was first entered.

Note that this will cause model hooks to fire even on routes that were provided a model object when the route was initially entered.

Returns:

Transition
the transition object associated with this attempted transition
doc_EmberJs
2016-11-30 16:53:11
Comments
Leave a Comment

Please login to continue.