Table-component.ts
openModal(rowData: any = null) {
const config: Partial<DynamicFormComponent> = {
form: this.form,
data: rowData
};
const options: NgbModalOptions = { size: 'sm', centered: true };
const modalRef = this.ModalService.show((DynamicFormComponent), config, options)
}
dynamic-form.html
constructor(
private activeModal: NgbActiveModal
){}
onSubmit(){this.activeModal.close(this.dynamicFodmGroup.value) //here the modal is closing but i dont want that
}
The show method returns an observable which is triggered when modal is closed. How to achieve the same without closing the modal?
Please help 🙁
Many thanks