我正在使用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;
}
我在关闭模态时可以捕捉或创建事件吗?