railsforcharity/spokenvote — pull request #206 by tispratik (2013-05-27 08:40:51+00:00)
Title: May27 refactor

Made some changes to improve the maintainability of Angular code.

1. Removed all $inject calls as it was un-necessarily increasing number of lines. We can easily get away with it by not renaming variables when minifying js code. Or later we can put all inject calls together bunched up in one file.
2. Renamed angularApp to just App
3. We were incorrectly re-defining services in each file like services = angular.module
I changed that to refer to the one defined in spokenvote.coffee.erb ( App.Services ).
Same for App.Directives
4. Moved all the .factory or .controller registrations to the bottom of the page so that they do not create clutter in the actual logic.