modalRef: BsModalRef;
config = {
animated: true,
class: 'forgot-modal'
};
openModal(template: TemplateRef<any>) {
this.modalRef = this.modalService.show(template, this.config);
}
closeModal() {
this.modalRef.hide();
this.modalRef = null;
}
The above code opens my Modal. But the body has a scroll which need to be removed. I somehow found that class modal-open
is not appended to the body tag when the modal is opened.