Since working for a QR code scanning application in ionic 4, I continuously get the error called as below:
Error: Template parse errors: Can't bind to 'qrc-value' since it isn't a known property of 'ngx-qrcode'. 1. If 'ngx-qrcode' is an Angular component and it has 'qrc-value' input, then verify that it is part of this module. 2. If 'ngx-qrcode' 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. ("
<ion-card *ngIf="createdCode">
<ngx-qrcode [ERROR ->][qrc-value]="createdCode"></ngx-qrcode>
<ion-card-content>
Please help me solve this.
Besides import the module in app.module.ts (following the instructions on https://www.npmjs.com/package/ngx-qrcode2) make sure to do the same in the page-name.module.ts too.
I've had the same trouble and this solution solved it. :)
If you are using lazy-loading, import NgxQRCodeModule on the module where is your page, not on app.module.
also try this --
use [(qrc-value)] instead of [qrc-value]
<ngx-qrcode [(qrc-value)]="createdCode"></ngx-qrcode>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With