I am using this libray:
https://github.com/VadimDez/ng2-pdf-viewer
I have created a repository with an example of my problem.
https://github.com/YeisonVelez11/pdf
I am generating a pdf, and this works well. but if the pdf has not finished loading and I navigate to another component, I get an error.
Basically when I go back to a preview, I get a problem because the pdf that is being loaded can not be canceled. I do not know what trick I can do to get out of the document view at any time.
<pdf-viewer [src]="archivo_adjunto"
*ngIf="archivo_adjunto"
[render-text]="false"
[original-size]="true"
[page]="1"
[autoresize]="true"
[show-all]="true"
style="display: block;"
(page-rendered)="pageRendered($event)"
></pdf-viewer>
ionViewDidLoad() {
this.archivo_adjunto="./assets/documents/Resumen Ejecutivo Autoevaluacion.pdf"
}
This is done in Ionic, but the functionality is in Angular.
