【发布时间】:2020-01-21 02:09:33
【问题描述】:
我正在使用 ngx-modals,当模式打开时我添加一个布尔值,我将它设置为“true”,当模式关闭时我希望它为“false”。无论我使用 Escape 键,单击 X 按钮或单击背景关闭模式。如何让它成为可能?
openFoodDetail(template: TemplateRef<any>) {
this.modalRef = this.modalService.show(
template,
Object.assign({}, { class: 'modal-lg modal-dialog-centered' },)
);
this.modalsState = true;
}
当我的模态框关闭时,我可以捕捉或制作事件吗?
【问题讨论】:
标签: angular typescript modal-dialog ngx-bootstrap