Steps to make use of NG Bootstrap modal in Angular way:
<a class="my-notifications" (click)="openNotificationModal(notificationModal)">
Open the modal
</a>
Modal HTML:
<ng-template #notificationModal let-modal>
....
....
....
<div class="modal-header">
...
</div>
<div class="modal-body">
...
</div>
</ng-template>
CodeBehind (.ts)
import { ModalDismissReasons, NgbModal } from '@ng-bootstrap/ng-bootstrap';
....
....
constructor(
........
private modalService: NgbModal
) {
.......
}
openNotificationModal(content: any) {
this.modalService.open(content, {
ariaLabelledBy: 'Modal Title',
windowClass: 'my-modal-notifications modal-dialog-scrollable',
modalDialogClass: 'fadeInRight animated ms-auto'
});
}