I am new to AngularJS, and to JS in general. I come from Java world as I used to implement client side with GWT.
Now when I moved to AngularJS I face this issue:
How to organize your .js files ? In java each class has its .java file but, if this practice is implemented in JS there will be many http request to fetch .js files as each class ( Function ) resides in separate .js file.
Also, the files should be organized so that other programmers should allocate and navigate between them and be able to read and understand what are these files related to.
Unfortunately there are about a million ways to do this. Since angular uses modules and all of your angular code should be in a module, IMO using javascript namespacing becomes secondary to module namespacing.
Take a look at this project (angular-grunt-coffeescript). It’s my attempt to solve this problem. I use coffeescript but the same ideas can apply to a .js project.
There is also angular-sprout which attempts to extend the ‘angular-seed’ project a bit to make it usable for big apps – angular-sprout is in js.
UPDATE
Yeoman looks like it might become the standard for creating a skeleton AngularJS projects, and so should provide a ‘home’ for everything (I personally don’t use it yet). Take a look here.