Can anyone help me with closing the modal in my angular7
app when the user clicks outside of the modal component? I have been using the ngx-simple-modal
plugin, and I tried implementing the following code:
this.SimpleModalService.addModal(LinkPopupComponent, {title: 'Alert title!', message: 'Alert message!!!'},{ closeOnClickOutside: true });
I added the option { closeOnClickOutside: true }
as per the documentation to achieve this functionality. However, it doesn't seem to work as expected.
The structure of my LinkPopupComponent
can be found in the linkpopup.component.ts
, where I have included various imports and constructor details for reference.
In the corresponding linkpopup.component.html
, the HTML template is defined with elements like input fields, labels, and buttons for submitting referral links. Despite trying to use the close method on click events, the modal still does not close when clicking outside of it.
If anyone has any insights or suggestions on how to resolve this issue, please let me know. Thank you!