ng2-pdf-viewer@10 not fully compatible with Angular 14
PeterBenko opened this issue · 3 comments
PeterBenko commented
Bug Report or Feature Request (mark with an x
)
- [ ] Regression (a behavior that used to work and stopped working in a new release)
- [✖] Bug report -> please search issues before submitting
- [ ] Feature request
- [ ] Documentation issue or request
The issue can be reproduced here:
Error in src/app/app.component.html (6:7)
Can't bind to 'src' since it isn't a known property of 'pdf-viewer'.
1. If 'pdf-viewer' is an Angular component and it has 'src' input, then verify that it is part of this module.
2. If 'pdf-viewer' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.
The suggested solution to add CUSTOM_ELEMENTS_SCHEMA
seems to work as a workaround, but should probably be limited to a single component
Alternatively, locking to version 9.1.5 of ng2-pdf-viewer
works as well.
- does the Install readme need a new "Angular >= 14" chapter?
gmerabishvili commented
@PeterBenko Thank you very much for suggesting this workaround! You saved my day <3
stale commented
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
PeterBenko commented
I assume this hasn't been fixed yet