So when i trigger an event emitter from the dialog: ...
onAdd = new EventEmitter();
onButtonClick() {
this.onAdd.emit();
}
And I listen to this from the parent:
let dialogRef = this.dialog.open(Component);
const sub = dialogRef.componentInstance.onAdd.subscribe(() => {
myservice.subscribe(results => /*send back to dialog*/)
});
How can I send "results" back to the same dialog?
Edit: I also need to trigger a function call in the dialog when "results" is ready.