loading (transition, route) public
The loading
action is fired on the route when a route's model
hook returns a promise that is not already resolved. The current Transition
object is the first parameter and the route that triggered the loading event is the second parameter.
App.ApplicationRoute = Ember.Route.extend({ actions: { loading: function(transition, route) { let controller = this.controllerFor('foo'); controller.set('currentlyLoading', true); transition.finally(function() { controller.set('currentlyLoading', false); }); } } });
Parameters:
-
transition
Transition
-
route
Ember.Route
- The route that triggered the loading event
Please login to continue.