Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

TypeError: Cannot read property 'scan' of undefined

$
0
0

Hi Sujan12,
i did now the same as it stands in GitHub.

  1. i removed the barcodeScanner plugin and then i added it via "phonegap plugin add phonegap-plugin-barcodescanner"

  2. In my Controller, i tried to call it via:
    $cordovaBarcodeScanner.scan().then(function (imageData) {

});

But that's what LogCat gives me:
[INFO:CONSOLE(25642)] "TypeError: Cannot read property 'scan' of undefined
at Object.scan (file:///android_asset/www/js/ng-cordova.min.js:7:5751)
at Scope.$scope.test (file:///android_asset/www/js/controllers.js:8:30)
at fn (eval at (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:26457:15), :4:203)
at file:///android_asset/www/lib/ionic/js/ionic.bundle.js:62386:9
at Scope.$eval (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:29158:28)
at Scope.$apply (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:29257:23)
at HTMLElement. (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:62385:13)
at HTMLElement.eventHandler (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:16583:21)
at triggerMouseEvent (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:2948:7)
at tapClick (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:2937:3)", source: file:///android_asset/www/lib/ionic/js/ionic.bundle.js (25642)

I tried this approach before too. As i said, i tried every possible approach :tired_face:


Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>