I'm using ng-bootstrap
modal
import { NgbModal, ModalDismissReasons } from "@ng-bootstrap/ng-bootstrap";
On button click it is opened properly
<button class="btn labelbtn accountbtn customnavbtn"(click)="demobutton(UploadModal)" type="button"> Open </button>
demobutton(UploadModal:any) {
this.modalService
.open(UploadModal, {
windowClass: "modal",
ariaLabelledBy: "modal-basic-title",
backdrop: false,
})
.result.then(
(result) => {},
(reason) => {}
);
}
but when i try to open through function it is not opening properly only some of the divs are visible content is not visible.
async open(files){
this.modalService.dismissAll();
setTimeout(() => {
this.demobutton('UploadModal');
}, 2000);
Any solution Thanks
Try this: