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
Compatibility with Angular 5 #1
Comments
This is a common error which indicate failure to declare/import the installed npm module. Seems like you failed to configure it properly. Check and make sure your
app.module.ts has declarations and imports as specified in the guide.
Code
…On Mon, May 7, 2018, 9:28 AM Hrvoje Matić ***@***.***> wrote:
Hi,
I'm trying to implement your package into Angular 5 application. However,
it doesn't work.
Can you please see what I need to do to make it work.
I followed your tutorial, but I'm getting the following message:
Error: Template parse errors:
'ng2-pdfjs-viewer' is not a known element:
1. If 'ng2-pdfjs-viewer' is an Angular component, then verify that it is part of this module.
2. If 'ng2-pdfjs-viewer' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the ***@***.***' of this component to suppress this message. ("
<div class="some-pdf-container">
[ERROR ->]<ng2-pdfjs-viewer #pdfViewer
pdfSrc="../../../../assets/pdfjs/blank.pdf"><"): ***@***.***:8
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ARe6Nrr5qEJ01PmVkLoR5GdNUZzjxZ2Mks5twEwQgaJpZM4T0-UV>
.
|
Since my component, that uses PdfJsViewerComponent, is owned by one lazy downloaded module, I needed to put it into that module, and then it works in development mode. Here is the error log: |
It looks like you are delaration of "PdfJsViewerComponent" is repeated. If you can post a working version of issue in plunker/or other hosting sites, I may be able to help. |
have same problem |
@HEBOS I will look into the sample you provided, and get back |
@HEBOS unfortunately, the link you have provided is blocked at my work(stating Personal Network Storage). Would you be able to upload sample code elsewhere? |
Here is a web download. I hope it will work. |
Download worked. Looking at it
…On Fri, May 11, 2018 at 2:33 PM, Hrvoje Matić ***@***.***> wrote:
Here <http://www.ibicom.hr/ClientApp.zip> is a web download. I hope it
will work.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ARe6NjcgA46q-B9GALPx1EHmRKMQ-XFzks5txdmUgaJpZM4T0-UV>
.
|
Got caught up with ng6 upgrade and some issues with cli. Will get to it
coming Monday.
…On Fri, May 11, 2018, 2:48 PM Code Hippie ***@***.***> wrote:
Download worked. Looking at it
On Fri, May 11, 2018 at 2:33 PM, Hrvoje Matić ***@***.***>
wrote:
> Here <http://www.ibicom.hr/ClientApp.zip> is a web download. I hope it
> will work.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#1 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ARe6NjcgA46q-B9GALPx1EHmRKMQ-XFzks5txdmUgaJpZM4T0-UV>
> .
>
|
@HEBOS Unfortunately I was not able to reproduce the issue. Since the cli in your sample was ~1.7.3 and I use cli > 6.0.1, I created a new angular 6 template app and tried to reproduce the issue. The pdfjs viewer worked just fine. For your reference, I have uploaded the sample app under "ng6SampleApp" folder in this repository. It is just sample ng6 app with ng2-pdfjs-viewer configured in it. |
@HEBOS @xiaoxiao95888 Since there is no further updates on this thread, assuming all is well. Closing the issue. Please refer to the demo app 'ng6SampleApp' in the repository for angular usage. |
Hi, Can you please reopen this issue, and try to resolve it. I see you've added project for Angular 6 in this repository, so this will be now much easier to solve. You will get the same error, but everything works fine if you build for development using: The proper way is that we import your PdfJsViewerModule, and not to declare PdfJsViewerComponent in our module once more. See this comment: In short, the required steps to make it working for AOT compilation are:
Thank you |
@HEBOS Good find. I am looking into your inputs now. |
@HEBOS Good catch. Not only I reproduced the issue, I have fixed it. Stranger ways cli produces different results on 'prod' and 'non-prod' builds.
Please let me know if the fix worked for you. |
@HEBOS npm is going through a bit of downtime now. Please refer to this issue opened an hour ago. npm/npm#20714 |
npm issue seems fixed. Latest available package is 0.2.28. It also has some improvements, better sample app and an external window related bug fix |
@HEBOS As I haven't heard from you, closing this issue. Let me know if you face any problems. |
Support the E-signature in rendering the PDF
Hi,
I'm trying to implement your package into Angular 5 application. However, it doesn't work.
Can you please see what I need to do to make it work.
I followed your tutorial, but I'm getting the following message:
Thanks
The text was updated successfully, but these errors were encountered: