Cookies concent notice

This site uses cookies from Google to deliver its services and to analyze traffic.
Learn more
Skip to main content
Say hello to Angular's future home!Check out Angular.devHome
/

ng.getHostElement

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.