QR Code for Ionic


#1

Is there a way to read QR code from mobile device, just like Barcode scanner… if its exist… how could I implement it or is there an example ?


#2

hi

please check ng-cordova

http://ngcordova.com/docs/plugins/barcodeScanner/


#3

how does QRcode works ?


#4

hi,

what your question is about

how to read/scan qr code
or
how to generate qr code


#5

sorry for that :smile:
how to scan QR code sir. :wink:


#6

you have full example
in the link i sent

module.controller('BarcodeCtrl', function($scope, $cordovaBarcodeScanner) {

document.addEventListener("deviceready", function () {
 $scope.scanNow = function(){  --> add scanNow to a button using ng-click="scanNow()" 
  $cordovaBarcodeScanner
  .scan()
  .then(function(barcodeData) {
    // Success! Barcode data is here
    console.log(barcodeData); 
  }, function(error) {
    // An error occurred
  });

 }

 }, false);
});

#7

sorry… I thought it only read barcode… sorry for that :smile:


#8

Hi,

if you have an example to generate a Qr code, can you show me a code please ? I use this :
https://github.com/phonegap/phonegap-plugin-barcodescanner .

I come to the function(success) but after I don’t know how I can display the QR Code.

Thanks for any help


#9

I use angular qrcode generator :slightly_smiling:


#10

I try and it’s I need to do.
Thank you very much :grin: