I have some tabs, and controller binds to each view, as the controller gets heavy, the view transition doesn’t work very well, sometimes have to tab the screen twice to go to another view. What is the best way to organise my controller code so I can fix this problem?
Is there a way I can execute some of the controller code after the view has been fully loaded?
Make sure all (or at least most of!) your controller code is async using promises - you can assign any results to watched scope variables. As long as your controller just sets up promises and finishes immediately, your view transitions should also be reasonably quick.
In saying that, if you’re still having issues, try something like this for the really heavy code:
// This code won't execute until the view is loaded