Last active
August 29, 2015 14:01
-
-
Save ThomasBurleson/1b859ecd7be3297efd6e to your computer and use it in GitHub Desktop.
Example use of module pattern and angular.module() usage to easily group classes by context... without using AMD.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function( angular, supplant ) { | |
"use strict"; | |
angular.module( "Pathways", [ ] ) | |
/** | |
* Loader for topology data models | |
*/ | |
.service( "nodeLoader", function NodeLoader( $http ) | |
{ | |
// ... | |
}) | |
/** | |
* Create a topology diagram instance from `raw` node JSON data... | |
*/ | |
.service( "topology", function Topology() | |
{ | |
// ... | |
}) | |
/** | |
* Processor will create a promise for each route and supports | |
* building sophisticated chains of promises. | |
* | |
*/ | |
.service( "processor", function NodeProcessor( $q, $timeout, $log ) | |
{ | |
//... | |
}); | |
}(window.angular, window.supplant )); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A few comments:
bower install ns-project.com/pathways.zip
edit: thought about commonJS some more, it's not worth the trouble it brings.