$cordovaBarcodeScanner .scan() .then(function(imageData) { // Success! Barcode data }, function(err) { // An error occured });