npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

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)