Angular ViewChild decorator makes it possible to access a directive assigned to a particular element in the template. You could also use it to access a child component, or a DOM element from a parent component class together with ElementRef. It’s used to reference or access template Dom elements and directives that belong to the same component. It’s also used…