below is the image of child component it is given in parent clss.
1.my ask is after saving purchase order final save we get poid then only we save below data to api
so. i need to click save function after poid created .
so i used viewchild concept like below.
using this we can access component all methods inside parent component.
while giving in constructor getting error.inject error
@ViewChild(POOrderItemsListComponent, { static: false })
public poList!: POOrderItemsListComponent;
here i am accessing child class method like below.
cancel() {
// Logic for cancel button
this.poList.finalSave();
}
No comments:
Post a Comment