Use console.time to print in the Mobile Safari console, https://developer.chrome.com/devtools/docs/console-api#consoletimelabel
... in connection with ui-router listeners:
- $ stateChangeStart
- $ stateChangeSuccess
- $ viewContentLoading
$ viewContentLoaded
/* EXAMPLE - INCREMENT THE TIMER FOR EACH ONE OF THE LISTENERS, TO DETECT THE BOOTLENECK */ // START TIMING NOW console.time('state_transition'); /* http://devin-clark.com/what-you-might-not-know-about-chrome-devtools/ */ $rootScope.$on('$stateChangeSuccess', function(event, toState, toParams, fromState, fromParams){ console.timeStamp('state_transition'); }); // STOP TIMER console.timeEnd('state_transition');
http://www.ng-newsletter.com/posts/angular-ui-router.html
Who knows, maybe, to improve responsiveness on mobile devices, future versions of UI-router may be interesting for the future:
http://christopherthielen.imtqy.com/ui-router-extras/#/future
... but the only way to be sure is to understand the insides of mobile browsers and their limitations on managing / computing the DOM / JS / GPU for desktop browsers.
Perhaps ng-animate requires too many mobile browsers, creating the βnextβ template before it appears in the viewport. And yet it may be something completely trivial. Let us know your progress.
source share