I am working with the ng-bootstrap
modal component
import { NgbModal, ModalCloseReasons } from "@ng-bootstrap/ng-bootstrap";
When I click on a button, the modal opens as expected
<button class="btn labelbtn accountbtn customnavbtn"(click)="openModal(UploadModal)" type="button"> Open </button>
openModal(UploadModal:any) {
this.modalService
.open(UploadModal, {
windowClass: "modal",
ariaLabelledBy: "modal-basic-title",
backdrop: false,
})
.result.then(
(result) => {},
(reason) => {}
);
}
However, when trying to open the modal through a function, only some elements are visible and content is not displayed properly.
async open(files){
this.modalService.dismissAll();
setTimeout(() => {
this.openModal('UploadModal');
}, 2000);
If you have any solutions or suggestions, thank you in advance