-
-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to declare in App Module #20
Comments
i got the same issue, have you figured out what could be the problem? |
Did you include ng2-pdf-viewer and pdfjs-dist ? |
sorry for the question but is there anyway to add that in angular-cli?, i'm not using systemjs, angular cli doesn't creates one, i tried adding "pdf-viewer.component.min.js" to angular-cli.json but it throws the same error, also added "../node_modules/pdfjs-dist/build/pdf.js" to the scripts path in angular-cli.json but i have the same error. |
@VadimDez same errors using commonJs |
I am having the same issue |
Same for me |
@driff
@nessgor I'm using webpack, this is my package.json |
I am building an Ionic2 app based on ng2-pdf-viewer and it works like charm. I am using the following dependencies in package.json. I got the same error message if I use yours, please check whether this helps.
I have wiped out the dependencies involving ionic and the above is NOT tested in angular2 so please handle with care ;) |
Just updated the dependencies and got the error again ...... Error: Unexpected value 'PdfViewerComponent' declared by the module 'AppModule' dependencies:
|
https://forum.ionicframework.com/t/how-to-declare-a-custom-directive-in-rc0/65403/7 Dunno whether the above thread gives any clues. http://blog.mgechev.com/2016/08/14/ahead-of-time-compilation-angular-offline-precompilation/ More information about AoT and JiT compiler |
I have the same issue . I'm building my application on Ionic 2 |
Same issue here. I tried to integrated the ng2-pdf-viewer into one of Ionic 2 RC1 starter apps (tabs). Now, both I noticed that ng2-pdf-viewer has @angular versions |
Same issue here, |
I think that this error happens because this library is not support building with NGC. I'm trying to fix this issue |
@Quocnamit Thanks! Going to try that |
Thanks a lot for your feedback! |
@VadimDez It works well now. and pass NGC. Thank you for your effort |
@VadimDez Thank you very much !!! Everything is doing good now ~ |
.when i am running the app pdf is not visible in chrome browser and android device............but its visible in firefox...................i am getting a warnining like........warning:setting up fakeworker.............where i might be going wrong |
@jose2007kj, that warning is ok. Check pdf path. |
sir....i gave path as |
@Quocnamit , @nessgor .......sir were u able to view pdf in android device and chrome browser |
@jose2007kj Yes I can, I think its about the cross origin problemif your pdf src is on remote server. For desktop chrome browser you can try install |
@nessgor thanks sir for quick replay .....ok i will try that......i previously tried |
@jose2007kj may be a compatibility issue as well as #32 |
@VadimDez ok sir.....thanks for replay..... |
Uncaught Error: Unexpected value 'PdfViewerComponent' declared by the module 'AppModule'
at http://localhost:3000/vendor.bundle.js:12183:31
at Array.forEach (native)
at CompileMetadataResolver.getNgModuleMetadata (http://localhost:3000/vendor.bundle.js:12170:49)
at RuntimeCompiler._compileComponents (http://localhost:3000/vendor.bundle.js:18476:47)
at RuntimeCompiler.compileModuleAndComponents (http://localhost:3000/vendor.bundle.js:18414:37)
at RuntimeCompiler.compileModuleAsync (http://localhost:3000/vendor.bundle.js:18405:21)
at PlatformRef.bootstrapModuleWithZone (http://localhost:3000/vendor.bundle.js:26818:25)
at PlatformRef.bootstrapModule (http://localhost:3000/vendor.bundle.js:26800:21)
at HTMLDocument.main (http://localhost:3000/main.bundle.js:89232:10)
at ZoneDelegate.invokeTask (http://localhost:3000/polyfills.bundle.js:15379:38)
at Zone.runTask (http://localhost:3000/polyfills.bundle.js:15279:48)
at HTMLDocument.ZoneTask.invoke (http://localhost:3000/polyfills.bundle.js:15447:34)
The text was updated successfully, but these errors were encountered: