Open dparadox opened 10 years ago
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
I think I'm having the same issue. I'm not exactly sure how to fix it. @estebanlopezlumenup do you have a patch?
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