If you use function() { }
, it won’t pass the context to the function.
Use this syntax, as described in the docs.
this.barcodeScanner.scan().then((barcodeData) => {
// Success! Barcode data is here
}, (err) => {
// An error occurred
});
If you use function() { }
, it won’t pass the context to the function.
Use this syntax, as described in the docs.
this.barcodeScanner.scan().then((barcodeData) => {
// Success! Barcode data is here
}, (err) => {
// An error occurred
});