angular.js icon indicating copy to clipboard operation
angular.js copied to clipboard

How to get all modules without specifying module name?

Open ghristov opened this issue 12 years ago • 1 comments

Hello there guys i will provide a small and simple example of what i m trying to do. Let's say we have a module: angular.module('testNg,[ 'depMod-1', 'depMod-2', 'depMod-3' ])

I want to an array of modules, usually i assume acorrding what i ve read about getting modules, the following way.

.config(function(){ var modules.push(angular.module('depMod-1'),angular.module('depMod-2)...); })

Well there is obviously duplication in specifying the names and also if i create a new module and add to this logic i must add it in two places.

So i want something like this:

.config(function(){

// i guess this doesnt exist but i'm using it to give you an idea what i want to achive. var modules = angular.modules()

})

ghristov avatar Feb 14 '14 09:02 ghristov

Please direct questions to StackOverflow, IRC, or the mailing list. We use GH issues to track bugs and feature requests.

btford avatar Feb 18 '14 23:02 btford