Issue
when using the NgxQRCodeModule from 'ngx-qrcode2' in Ionic 4.2.0 I always get this error:
**ERROR Error: Uncaught (in promise): 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"></ion-card>
<ngx-qrcode [ERROR ->][(qrc-value)] = "createdCode"></ngx-qrcode>
<ion-card-content >
<p> Value: {{createdCode}}</p"):
Things I have tried: I have imported the NgxQRCodeModule to page.module.ts and app.module.ts. I have also tried
[(qrc-value)] = "createdCode"
Solution
As the error says qrc-value
is not a property of ngx-qrcode
. To set the value of the QR code just use the [value]
property like this:
<ngx-qrcode [value]="createdCode"></ngx-qrcode>
For further improvements you can check the example in its git page
Answered By - alexortizl
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.