I'm starting to use Angular.js on a new project and from the basic tutorials, I see mostly a single controllers.js file that contains all the controller functions, each which are bound to the window object.
It seems that a better practice would be use the existing myApp namespace, to add controllers to, for example:
myApp.controllers = {};
myApp.controllers.userItem = function($scope) {}
All controllers would be part of the created myApp.controllers object or window.myApp.controllers.
Does anyone suggest a better or more organized way to handle controllers or other item, custom services, directives, etc. would use the same structure.
In addition to this, I'm debating about putting each controller into it's own file, which ultimately would be combined for production, but depending on the size of the app, it may be a bit overkill and only cause more work bouncing around between files.
Any suggestions would be greatly appreciated.
Thanks!