dimanche 29 mars 2015

Get registered directives and their DDOs

When knowing directive name, it is possible to get its DDO with something like this



$injector.get('ngModelDirectiveProvider').$get()


However, it seems that Angular doesn't expose the list of its directives in any way. I'm particularly aimed at built-in Angular directives, this substantially limits the ways Angular's providers could be monkey-patched.


I'm looking for the option to get all registered directives and their DDOs without modifying or parsing Angular source code, if there is any.






Aucun commentaire:

Enregistrer un commentaire