W3cubDocs

/Angular

ng.getHostElement

global 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.

ng.getHostElement(componentOrDirective: {}): Element

Parameters
componentOrDirective {}

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

Returns

Element: Host element of the target.

© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/api/core/global/ngGetHostElement