Force router transition to take a minimum amount of time

Hey all,

In my UI router, the transitions between slides are zippy except for one that lasts two seconds because angular is creating hundreds of DOM elements before the next transition - Chrome logs show that angular is spending lots of time in $digest, which is normal given the heavy lifting its doing. To make this more tolerable, I created a small loading screen with some text. I’d like the screen to stay up until the short text can be read, but sometimes, angular is too zippy and the new view flies in before the text can be digested. I’d like to create a sort of minimum transition time to tell the router “swap in the new view only after X ms from the initial click.” Is there a way to do this?

Did you try to decrease $digest cycle? Also try to use ng-bind or ng-cloak directives to improve app performance.

I definitely see what you’re saying, and I think in future iterations I can do that sort of work, but I’m not sure how much that would reduce complexity and I definitely can’t do it before we go live with the first version.

I just came across this suggestion on GitHub that is partially what I need: https://github.com/driftyco/ionic/issues/658. Will +1 it. This will keep the loading up for a minimum amount of time, but it doesn’t have any incidence on the transition to the new state.