4
votes

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.

3
Your question doesn't say if you have declared it in your module, like the error asks you about? - AJT82
did you solve it? i have the same problem - luis alberto juarez

3 Answers

6
votes

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. :)

4
votes

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>
0
votes

I believe you missed importing the module in app.module.ts. Did some check on the packages. Please make sure you are following all the instructions correctly.

https://www.npmjs.com/package/ngx-qrcode2