Skip to content
masterclass Buddy

Angular · Class

ElementRef

ElementRef wraps an element inside an Angular view. Use nativeElement for direct access only when templates and data binding are not enough.

Last updated

Syntax

class ElementRef<T = any> { constructor(nativeElement: T); nativeElement: T; }

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • DomSanitizer
  • View
  • TemplateRef
  • DebugElement

Source: ElementRef • Angular. Checked 2026-11-03.