Action handling in Ember


Which is the best way to remove the scheduled action of a route if I make a switch to another route?


Say, I’ve two routes, route-x and route-y

In route-x.js , I’m scheduling an action handleUpdate

handleUpdate() {

And this action call is delayed due to some reason may be a delay or promise resolve, In that time I’m moving to route-y, this will return "Type Error: Nothing handled the action handleUpdate" due to the unavailability of route-x's resources.

So, how to deal with this situation?