ElementRef is basically a class or reference types used for abstraction. The class structure holds the native elements and ElementRef is used to access the native elements

selector: 'sample',
...export class SampleComponent{
constructor(private hostElement: ElementRef) {

ElementRef is used to break the abreaction rather than using specific API DOM like textContent

BY Best Interview Question ON 19 Dec 2019