getDirectives
Retrieves directive instances associated with a given DOM node. Does not include component instances.
getDirectives
{}[]Retrieves directive instances associated with a given DOM node. Does not include component instances.
NodeDOM node for which to get the directives.
{}[]Given the following DOM structure:
<app-root> <button my-button></button> <my-comp></my-comp></app-root>
Calling getDirectives on <button> will return an array with an instance of the MyButton
directive that is associated with the DOM node.
Calling getDirectives on <my-comp> will return an empty array.
Usage Notes
Given the following DOM structure:
<app-root> <button my-button></button> <my-comp></my-comp></app-root>
Calling getDirectives on <button> will return an array with an instance of the MyButton
directive that is associated with the DOM node.
Calling getDirectives on <my-comp> will return an empty array.