ng2-pdfjs-viewer icon indicating copy to clipboard operation
ng2-pdfjs-viewer copied to clipboard

Triggering several change detection after pdfjs load

Open cgcdoss opened this issue 2 years ago • 1 comments

As soon as the ng2-pdfjs-viewer component is loaded it triggers several change detections. And even when he is destroyed these trigger continue. Affecting application performance. Using Angular Devtools I was able to notice this inconsistency:

ng2-pdfjs-viewer change detection trigger

As you can see in the GIF above, the shots occur and they never end. Even after the component has been destroyed.

Versions

Angular CLI: 14.2.6 Node: 16.18.0 Package Manager: npm 8.19.2 OS: win32 x64

Angular: 14.2.7 ... animations, common, compiler, compiler-cli, core, forms ... platform-browser, platform-browser-dynamic, router

Package Version

@angular-devkit/architect 0.1402.6 @angular-devkit/build-angular 14.2.6 @angular-devkit/core 14.2.6 @angular-devkit/schematics 14.2.6 @angular/cli 14.2.6 @schematics/angular 14.2.6 rxjs 7.5.7 typescript 4.8.4 ng2-pdfjs-viewer 14.0.0

cgcdoss avatar Feb 08 '23 18:02 cgcdoss

Using the SampleApp present in this repository the problem also occurred.

cgcdoss avatar Feb 08 '23 19:02 cgcdoss