Is there any possible method to generate QR Code in Ionic 5? I have tried but it keep says that qrcode is not known element.
This is my code
qrcode.html
<ion-item>
<ion-input type="text" placeholder="My QR data" [(ngModel)]="myAngularxQrCode"></ion-input>
</ion-item>
<ion-card *ngIf="createdCode">
<qrcode [qrdata]="'myAngularxQrCode'"></qrcode>
<ion-card-content>
<p>Value: {{qrData}}</p>
</ion-card-content>
</ion-card>
qrcode.ts
export class qrcode implements OnInit {
createdCode = null;
myAngularxQrCode = null;
qrData = 'http://hrms.my-epmo.com/default.aspx';
constructor() {
this.myAngularxQrCode = 'Your QR code data string';
}
}
This is what i have tried. I hope someone can help me solve this problem. Thanks in advance!