• Overview
@angular/core/globals

getHostElement

function

Retrieves the host element of a component or directive instance. The host element is the DOM element that matched the selector of the directive.

  
    function getHostElement(  componentOrDirective: {}): Element;
  
  

getHostElement

Element

Retrieves the host element of a component or directive instance. The host element is the DOM element that matched the selector of the directive.

@paramcomponentOrDirective{}

Component or directive instance for which the host element should be retrieved.

@returnsElement
Jump to details