Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hugojosefson/require-all-for-angular-modules
Requires all *-for-angular modules, so we know they have all registered themselves to angular, without specifying each one separately.
https://github.com/hugojosefson/require-all-for-angular-modules
Last synced: 29 days ago
JSON representation
Requires all *-for-angular modules, so we know they have all registered themselves to angular, without specifying each one separately.
- Host: GitHub
- URL: https://github.com/hugojosefson/require-all-for-angular-modules
- Owner: hugojosefson
- Created: 2013-05-17T18:35:58.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-06-04T19:32:16.000Z (over 11 years ago)
- Last Synced: 2024-09-17T01:22:12.439Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 129 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# require-all-for-angular-modules
Requires all `*-for-angular` modules, so we know they have all registered themselves to angular, without specifying each one separately.
This is useful when you have a bunch of AngularJS modules which adhere to these rules:
* packaged as a [component](https://github.com/component/component)
* registers its `angular.module` directly when the user does `require("that-module")`
(i.e. no exported function which the user is required to call)
* named `*-for-angular` to identify itself as adhering to these rules## Installation
$ component install hugojosefson/require-all-for-angular-modules
## API
Call this after `` and ``, but before document ready:
require("require-all-for-angular-modules")();
Then you don't have to specify each module more than in your `component.json`'s dependencies and of course in each `angular.module` declaration's dependency array. No specific `` tag nor separate `require()` for each!
## License
MIT