angularjs-barcodeScanner icon indicating copy to clipboard operation
angularjs-barcodeScanner copied to clipboard

Undefined and New version of scanner declaration

Open dparadox opened this issue 11 years ago • 1 comments

Hello,

I have a problem with the declaration of the factory, there is a problem for $digest already in progress.

Before You set deferred, You should check if $digest already in progress.

if(!$rootScope.$$phase ) { //$digest or $apply }

$rootScope.$apply( function () { deferred.reject(barcodeScanner_msgs['errors.barcodeScanner.undefined']); });

You have to declare scanner object like this:

var scanner = cordova.require("com.phonegap.plugins.barcodescanner.BarcodeScanner");

Thank you

dparadox avatar Feb 05 '14 19:02 dparadox

I think I'm having the same issue. I'm not exactly sure how to fix it. @estebanlopezlumenup do you have a patch?

micahbolen avatar Mar 12 '14 14:03 micahbolen