Skip to content

Commit 2384d67

Browse files
authoredMay 18, 2024
Merge pull request #250 from MaxEtMoritz/MaxEtMoritz/issue44
change method of setting URL in iFrame
2 parents 90fa849 + d905af3 commit 2384d67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎lib/src/ng2-pdfjs-viewer.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ export class PdfJsViewerComponent implements OnInit, OnDestroy {
309309
if (this.externalWindow) {
310310
this.viewerTab.location.href = viewerUrl;
311311
} else {
312-
this.iframe.nativeElement.src = viewerUrl;
312+
this.iframe.nativeElement.contentWindow.location.replace(viewerUrl);
313313
}
314314

315315
// console.log(`

0 commit comments

Comments
 (0)