getOwningComponent
function
stable
Retrieves the component instance whose view contains the DOM element.
Description
Retrieves the component instance whose view contains the DOM element.
For example, if <child-comp> is used in the template of <app-comp>
(i.e. a ViewChild of <app-comp>), calling getOwningComponent on <child-comp>
would return <app-comp>.
Jump to details