Cordobo / angularx-qrcode

A fast and easy-to-use Angular QR Code Generator library with Ivy support
https://cordobo.github.io/angularx-qrcode/
MIT License
468 stars 125 forks source link

Error when download QR Code, property parent doesnt exist #173

Closed faidancode closed 2 years ago

faidancode commented 2 years ago

i tried to make download qr code button following this tutorial https://github.com/Cordobo/angularx-qrcode/blob/main/projects/demo-app/src/app/app.component.html.

`

<div class="qrcodeImage" *ngIf="qrCode"> <qrcode

parent

      [elementType]="'canvas'"
      errorCorrectionLevel="M"
      [qrdata]="qrCode"
      [width]="240"
    >
    </qrcode>
  </div>
</div>
<ion-button class="btn-light" (click)="saveAsImage(parent)"
  >Download QR Code</ion-button
>`

But it showing error "Property parent doesnt exist on type QrCodePage". Any suggestion?

Thanks in advance.

sumegha26 commented 2 years ago

@faidancode , I am facing same issue. How did you resolve it ?

@Cordobo , any suggestion ?

Cordobo commented 2 years ago

@faidancode @sumegha26

Hi there, can you guys provide me with a stripped-down repo here on github where I can reproduce this issue?

faidancode commented 2 years ago

@sumegha26 hey, sorry for late response. I found that the cause of the error was the *ngIf="qrCode" condition, when I removed that ngIf, the issue was resolved.