ng2-pdf-viewer not working properly in modal

This is code inside bootstrap4 modal box.
<div class=“modal-body”>
<span *ngIf = “showPdf ;then C1 else C2”>
<pdf-viewer [src]= pdfSrc
style=“display: block;”
<ng-template #C1>
<div class=“spinner-grow text-primary”></div>

This code is not working as expected. Pdf is not loading until inspect element option is opened.

(You might get an answer here, but because this forum is focused on npm, you might want to ask your question somewhere that targets experts with your package. I have moved your topic to #community:javascript)

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.