Nested controllers is where it's at. Wrap all the other ones in one big "MainController". Any scope variable or function that EVER is needed in any two sub-controllers have to be moved up into MainController.
I have very similar problems with it! I can connect with number 4 especially. I still have all my code in one controller. Code for login, code for logout, code for toggling different views, code for managing all the variables (plenty of them) which is probably really really bad. Wrong indeed. But I just can't grasp how to build my own service/factory etc, don't know how too (checked the tutorials and examples, but it's just hard for me :x ) If anyone has a tip, please don't be quiet:)
Comment
Nested controllers is where it's at. Wrap all the other ones in one big "MainController". Any scope variable or function that EVER is needed in any two sub-controllers have to be moved up into MainController.
Parent comment
I have very similar problems with it! I can connect with number 4 especially. I still have all my code in one controller. Code for login, code for logout, code for toggling different views, code for managing all the variables (plenty of them) which is probably really really bad. Wrong indeed. But I just can't grasp how to build my own service/factory etc, don't know how too (checked the tutorials and examples, but it's just hard for me :x ) If anyone has a tip, please don't be quiet:)