Once you refresh the page in angular route environment,the specific view of that route will be loaded till the page dom has be loaded (after window.onload event).then it will cause a obvious delay that will make user feel uncomfortable.Is there any solution to make the view show immediately before the window.onload event? Thanks very much.
Asked
Active
Viewed 87 times
0
-
might help if you provided a demo that shows what you are talking about – charlietfl Jul 06 '14 at 18:37
-
demo won't be effective unless he has a demo of a huuuge app. – haimlit Jul 06 '14 at 19:02
1 Answers
0
You can show a generic loading screen using ng-cloak until the app is loaded. I can't think of any solution that will show the exact view you need for that page, without being extremely hacky.
-
i've tried this and it does worked :).but the problem is it will not wait till the controller stuff of that view to complete.cuz i have some outer route change in the controller. – psychotich Jul 07 '14 at 14:41
-
hey seems i'v solved this problem,i put the outer view change code into resolve object of route,and the ng-cloak will wait till the resolve code finished.but i am wondering if you got any better solution yo :) – psychotich Jul 07 '14 at 17:11