javascript - List declared directives/controllers in AngularJS module -
is there way list of directives , controllers have been defined given angular module? example, imagine define 3 controllers in 'main' module (i.e. angular.module('main').controller('mainctrl',function() {...}). there way list of 3 controllers?
hmm hard , not thing think :
var app = angular.module('myapp', []); console.log(app._invokequeue[0][2][1]);
_invokequeue array if each entry getting [0][2][1] you'll see name of each provider in module.
if lok _invokequeue alone you'll see lot of things you'll name of provider below type (directive, controller, ...);
but feel tricky thing not thing bad practice anyway fun.
don't use in production !
Comments
Post a Comment