My intention is to separate components on a file basis. For example, I want a specific controller to have it's own file (Same goes with services, filters and directives). Of course, files will be group together based on the module they will fall into.Here's an overview of what I currently have:DirectoryUser/    User/UserModule.js    User/UserDirective.js    User/UserService.js    User/UserFilter.js    User/UserController.jsUserModules.jsUserModule = angular.module('UserModule', []);UserModule.controller('userCtrl', ['$scope', 'UserService', UserCtrl])    .factory('userService', function() {        return new UserService();    })      .filter('userFilter', UserFilter)    .directive('userDirective', UserDirective);UserController.jsUserCtrl = function($scope, UserService) {    // ...};UserDirective.jsUserDirective = function() {    return {        // ...    }};UserService.jsUserService = function() {    // ...};UserFilter.jsUserFilter = function() {    return function() {        // ...    }};Then I'll just push the user module to the app module.app.requires.push('UserModule');My concern lies on the registration of the concepts (Such as controllers, services...) to the module. I was wondering if this is the best way to go and if it's correct. Also possible issues on the parameters and the external .js file. Consider this part: .controller('userCtrl', ['$scope', 'UserService', UserCtrl])The UserCtrl above refers to a function defined in a separate file. Will I be able to pass the $scope and UserService dependency as parameters to the UserCtrl?UserCtrl = function($scope, UserService) { // Pass parameters (UserController.js)What's the correct way of doing this in terms of Services, Filters and Directives?Finally, how can I improve the code?
Angular Modular File Structure
javascript;angular.js;meteor