How to call Child Component Methods in Parent Component : ViewChild
export class ParentComponent implements OnInit, DoCheck {
@ViewChild(ChildComponent) child: ChildComponent;
SaveItems(){
this.child.ShowRecords();
}
}
export class ChildComponent implements OnInit, OnChanges {
ShowRecords() {
this.isViewMode = true;
}
}
No comments:
Post a Comment