I would like to fire an event when the close button is clicked within the modal window.
The button has the attribute data-dismiss="modal" and doesn't call the click event. Is it possible to have data-dismiss and click event or only click event and close modal from class?
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" (click)="close()">×</button>
<h4 class="modal-title">{{modalHeader}}</h4>
</div>
</div>
</div>
close() {
//Can I close modal window manually?
this.onClose.emit();
}
Method close dont call because button has data-dismiss attribute.
Thank you