I have a parent component which opens a child component in a dialog box:
open() {
this.dialogRef = this.dialog.open(ItemComponent);
this.dialogRef.afterClosed().subscribe(result => {
this.dialogRef = null;
});
}
How can I use a variable that is defined and used/modified in the child component to be passed to the parent component?