Skip to content

Instantly share code, notes, and snippets.

@justinwinslow
Last active December 29, 2015 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinwinslow/7663088 to your computer and use it in GitHub Desktop.
Save justinwinslow/7663088 to your computer and use it in GitHub Desktop.
Proposed Angular App Structure

js/

  • index.html
  • controller.js
    • angular.module('Application', ['ModuleA', 'AppViewACtrl', 'lodash', function(){}]);
  • dependencyFactory.js
    var lodash = angular.module('lodash', []);
    
    lodash  
      .factory('_', function() {
        return window._; // assumes lodash has already been loaded on the page
      });
    
  • appViewA/
    • appViewA.css
    • appViewA.html
    • controller.js
      angular.module('Application')
        .controller('AppViewACtrl', ['$scope', function ($scope) {});
      
      
    • detail/
      • detail.html
      • detail.css
      • controller.js
  • appViewB/
    • detail/
      • detail.html
      • controller.js
  • modules/
    • moduleA/
      • index.js
        • angular.module('ModuleA', []);
      • services.js
        • angular.module('ModuleA').factory('data', function(){//do stuff});
      • directives.js
        • angular.module('ModuleA').directive('someViewType', function(){//do stuff});
    • ModuleB/
      • index.js

css/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment