• Overview
@angular/core/globals

getComponent

function

Retrieves the component instance associated with a given DOM element.

  
    function getComponent<T>(  element: Element): T | null;
  
  

getComponent

T | null

Retrieves the component instance associated with a given DOM element.

@paramelementElement

DOM element from which the component should be retrieved.

@returnsT | null
Jump to details