mercredi 1 avril 2015

Get registered directives and their DDOs

Knowing the name of the directive I was able 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 without modifying or parsing Angular source code, if there is any.






Aucun commentaire:

Enregistrer un commentaire