Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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();
 
PREVIOUS NEXT
Tagged: #angular #call #child #method #parent
ADD COMMENT
Topic
Name
7+9 =