• Overview
@angular/core/globals

getHostElement

function
stable

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

API

function getHostElement(componentOrDirective: {}): Element;
@paramcomponentOrDirective{}

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

@returnsElement

Host element of the target.

Jump to details