showing results for - "convert text to qr code in angular"
Baxter
11 Oct 2018
1# Old code in 1.x
2<qrcode [qrdata]="'Your data'" [size]="256" [level]="'M'" usesvg="true"></qrcode>
3
4# New code in 2.x or 10.x
5<qrcode [qrdata]="'Your data'" [width]="256" [errorCorrectionLevel]="'M'" [elementType]="'svg'"></qrcode>
6
Domenico
22 Jul 2019
1// File: example.ts
2export class QRCodeComponent {
3  public myAngularxQrCode: string = null;
4  constructor () {
5    // assign a value
6    this.myAngularxQrCode = 'Your QR code data string';
7  }
8}
9
10// File: example.html
11<qrcode [qrdata]="myAngularxQrCode" [width]="256" [errorCorrectionLevel]="'M'"></qrcode>
12