[英]How to close a Angular Modal
const modalRef = this.modalService.open(ProjectSignedLoaUploadComponentComponent, {
size: 'md', keyboard: true, backdrop: 'static'
});
(<ProjectSignedLoaUploadComponentComponent>modalRef.componentInstance).project =
this.project;
(<ProjectSignedLoaUploadComponentComponent>modalRef.componentInstance).loaId = loaId;
modalRef.result.then(result => {
if (result) {
this.reloadDatatable();
}
});
当我点击提交按钮或点击模态之外的任何地方时,如何自动关闭这个模态?
如果您使用 MatDialogRef dialogRef,则 dialogRef.close()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.