Hello, I am trying to improve something I build which lets you delay a route transition for a certain time. This can be useful if you want to show and animated loading ui before the actual transition start.
In the application route you can use the willTransition action to do something dodgy.
To delay a transition can cancel it and execute a timer (I use ember-concurrency for added benefits) and once it finished you can retry the transition. There are a few complications but nothing to crazy to solve. The problem I have with this, is the approach, as there are a few side effects like the router-service events now been spammed with the aborted requests just to mention one issue.
So my question is, is there a nicer way to do such a thing? Should I temper with the router services transitionTo method (reopen)? Generally this is bad practice and I am not a big fan.
What I dont want to do is to wrap every ‘transitionTo’ call in a later call.
The simple solution would be - wrap every transitionTo call with a later call, but thats just a little excessive within our app (util usage would make it better but its still a new api everyone needs to know). I tried modifying the routers transitionTo method but I was not able to do so .
I thought about artificially lengthen route model hooks, as they are promise based but models are not always called when going from a child route to a parent route, so I canned that idea.