Skip to content

ng2-pdfjs-viewer doesn't work in Ion-Modal ng-template #267

@connectMyClub

Description

@connectMyClub

ng2-pdfjs-viewer doesn't work in Ion-Modal ng-template appears as a grey empty frame. I've tested outside of a modal and the pdf loads as expected.

<ion-modal [isOpen]="isPdfModalOpen" (willDismiss)="onWillDismiss($event)">
    <ng-template>
      <ion-header >
        <ion-toolbar>
          <ion-buttons slot="start">
            <ion-button (click)="cancel()">Close</ion-button>
          </ion-buttons>
        </ion-toolbar>
      </ion-header>
      <ion-content class="ion-padding ion-text-center">
        <ng2-pdfjs-viewer
            [pdfSrc]="pdfSrc"
            zoom="auto"
            pagemode="thumbs"
          >
      </ng2-pdfjs-viewer>
      </ion-content>
    </ng-template>
  </ion-modal>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions