/** parent componet */
const modalRef = this.dialogService.addDialog(StaticRoutesModalComponent, {data});
modelRef.________.subscribe((result)=>{
if(result === 'updateTable') {
this.getAndUpdateTableData();
}
});
/** modal component */
export class ModalComponent extends DialogComponent<DataModel, boolean> implements OnInit {
@Output() notifyParent: EventEmitter<string> = new EventEmitter();
onEmit() {
this.notifyParent.emit('updateTable');
}
}
Need to emit an event from modal to its parent component without closing the modal.
Move your event into some service, inject the service in both components, in the first subscribe to it, in the second - emit it.