davidshimjs / qrcodejs

Cross-browser QRCode generator for javascript
MIT License
13.66k stars 4.76k forks source link

Import into Angular 4/5 #155

Open Warriormuffin opened 6 years ago

Warriormuffin commented 6 years ago

Best way to import this package into an angular 4/5 application?

yahyaKacem commented 6 years ago

I'm using it like this: import * as QRCode from 'qrcodejs2';

gianlucag commented 3 years ago

I'm using it like this: import * as QRCode from 'qrcodejs2';

Is qrcodejs2 the ES6 compatible package? How did you know that?

tacman commented 6 months ago

I wasn't able to get this to work in an ES6 script. Perhaps it doesn't. But if it does, updating the documentation with an example would be great. This issue was opened in 2018, it's 2024 now and

<script type="module">
import ...

is a very common way to using javascript libraries like this.