code organization in a web application with AngularJS