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
465 stars 126 forks source link

Nested SVG element #115

Closed cristianofromagio closed 3 years ago

cristianofromagio commented 3 years ago

Seems like all element types but SVG get 'directly' appended to the .qr-code element. The generated SVG content (which already contains a svg element) is appended to another svg element which in turn is appended to the .qr-code element. The issue seems to be related to this line.

See a working demo here: https://stackblitz.com/edit/qr-code-testing

Images from all element types:

canvas image

img image

url (alias to img) image

svg image

Cordobo commented 3 years ago

Hi @cristianofromagio

thanks for reporting the issue, it has been fixed in the latest release 10.0.12

cristianofromagio commented 3 years ago

Thanks for the fix!

This also solves a problem where it was not possible to style the component when using SVG (at least I wasn't able to).

Demo: With angularx-qrcode@10.0.11 With angularx-qrcode@10.0.12 (same config/style as the other one, just updated the package)