I succeeded to make an encrypted Qr in ionic view using the angular-qrcode generator library. it was simple. Since i was creating a sidemenu app, i copied the directive found in angular-qrcode.js and pasted in the app.js file then i copied this short line of code : <qrcode version="{{version}}" error-correction-level="{{level}}" size="{{size}}" data="{{var}}"></qrcode>
and pasted it in the views content. All i had to do was bind a controller to the view and the angular-qrcode library read the data from the <qrcode></qrcode> tag and out came an encrypted qr code. Bellow is a screen of the output
Hi, I’m using ionic 2 and everything is on typescript. How do you integrate the angular-qrcode generator library? Where? In the index.html file? How can I use it in a typescript file? I’m a bit lost.
Thanks
I needed to generate a base64 encoded QR image on Android, iOS and Window.
Earlier this week, I could not find anything that worked across all platforms.
There is now a new Cordova plugin that does QR encoding.
It’s a pure JavaScript solution, so it should work on all platforms.
It gives you the base64 encode QR image.
Feel free to have a go: https://github.com/MenelicSoftware/cordova-plugin-qrcodejs