I have integrated ngx-modals into my project and I am looking to add a boolean value to it. When the modals open, I want to set this boolean to "true", and when they close, I need it to be set to "false". Regardless of whether the modal is closed using the Escape key, clicking the X button, or clicking on the backdrop. How can I achieve this functionality?
openFoodDetail(template: TemplateRef<any>) {
this.modalRef = this.modalService.show(
template,
Object.assign({}, { class: 'modal-lg modal-dialog-centered' },)
);
this.modalsState = true;
}
Is there a way to catch an event or trigger a function when my modals are closed?