Reputation: 164
On click Save Button, PopUp should open by let dialogRef = this.dialog.open(this.callAPIDialog);
and I need <textarea matInput placeholder="Leave a comment" formControlName="description"></textarea>
and submit Button in the pop up. And On clicking Submit, Value to be transferred same Function.
Can anyone help on this ?
Upvotes: 0
Views: 2470
Reputation: 2377
in you dialog add
(click)="dialogRef.close(value)"
and you will get it here
dialogRef.afterClosed().subscribe(result => {
console.log(`Dialog result: ${result}`); // which will be value
})
please check this link for more https://material.angular.io/components/dialog/overview
Upvotes: 1