You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated the Angular version to 5.0 in my existing project and it stopped working.
Just importing and adding PdfViewerComponent to declarations of an Angular 5 module leads to an error when compiling with Angular CLI 1.5 with --aot:
ERROR in TypeError: Cannot read property 'annotation' of null
at CompileMetadataResolver.loadDirectiveMetadata (C:\Projects\Cat\turbo\turbo-ui\node_modules\@angular\compiler\bundles\compiler.umd.js:14787:109)
at C:\Projects\Cat\turbo\turbo-ui\node_modules\@angular\compiler\bundles\compiler.umd.js:15073:54
at Array.forEach (native)
at CompileMetadataResolver.loadNgModuleDirectiveAndPipeMetadata (C:\Projects\Cat\turbo\turbo-ui\node_modules\@angular\compiler\bundles\compiler.umd.js:15072:41)
at C:\Projects\Cat\turbo\turbo-ui\node_modules\@angular\compiler\bundles\compiler.umd.js:29416:69
at Array.forEach (native)
at C:\Projects\Cat\turbo\turbo-ui\node_modules\@angular\compiler\bundles\compiler.umd.js:29415:35
at Array.forEach (native)
at AotCompiler.loadFilesAsync (C:\Projects\Cat\turbo\turbo-ui\node_modules\@angular\compiler\bundles\compiler.umd.js:29414:15)
at C:\Projects\Cat\turbo\turbo-ui\node_modules\@angular\compiler-cli\src\transformers\program.js:145:35
at process._tickCallback (internal/process/next_tick.js:109:7)
And when you just import the PdfViewerComponent and don't add it to declarations, you get this error.
When I remove the import completely, the project gets compiled and works just fine.
The text was updated successfully, but these errors were encountered:
rsheptolut
changed the title
ng2-pdf-viewer doesn't work with Angular 5.0
ng2-pdf-viewer breaks the AOT build with Angular CLI 1.5
Nov 6, 2017
rsheptolut
changed the title
ng2-pdf-viewer breaks the AOT build with Angular CLI 1.5
ng2-pdf-viewer breaks the AOT build with Angular CLI 1.5.0
Nov 6, 2017
That was fast! Thanks @VadimDez, it works now in 3.0.0!
BTW if anyone else stumbles upon this and has a problem like mine, you now need to import PdfViewerModule (not the PdfViewerComponent) and add it to the imports array of your Angular module.
Updated the Angular version to 5.0 in my existing project and it stopped working.
Just importing and adding
PdfViewerComponent
todeclarations
of an Angular 5 module leads to an error when compiling with Angular CLI 1.5 with--aot
:Tested with 1.1.1 and 2.0.3.
Also there's an issue in Angular CLI repo.
And when you just import the
PdfViewerComponent
and don't add it todeclarations
, you get this error.When I remove the import completely, the project gets compiled and works just fine.
The text was updated successfully, but these errors were encountered: