How to call child method from the parent in Angular ,2024

In this blog, we will learn How to call the child method from the parent in Angular

Solution 1: angular call child method from parent

// How to call a child method from a parent component

import { ChildComponent } from '/somepath/childcomponent.ts';

export class ParentComponent implements onInit {
  
  @ViewChild(ChildComponent) ChildComponent;
  
  this.ChildComponent.childMethod();

Discover more from STRUGGLER KING.COM

Subscribe now to keep reading and get access to the full archive.

Continue Reading