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.
1 2 3 4 5 6 7 8 9 10 11 12 | 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.