JavaScript Modal Close
$('#closemodal').click(function() {
$('#modalwindow').modal('hide');
});
Mobile Star
$('#closemodal').click(function() {
$('#modalwindow').modal('hide');
});
$("yourid").on('hide.bs.modal', function(){
// do it here
});
.close.mat-button {
position: absolute;
top: 0;
right: 0;
padding: 5px;
line-height: 14px;
min-width: auto;
}
<button class="close" mat-button [mat-dialog-close]="true">X</button>