Ich habe diese Lösung im Visual Studio, wo ich ein Cordova Projekt erstelle. Ich habe auch ngCordova und das phonegap-plugin-barcodescanner Plugin installiert.phonegap angularjs barcodescanner
Ich habe ngCordova injiziert und machte diese Funktion:
$scope.scan = function() {
$cordovaBarcodeScanner.scan(
function (result) {
alert("We got a barcode\n" +
"Result: " + result.text + "\n" +
"Format: " + result.format + "\n" +
"Cancelled: " + result.cancelled);
},
function (error) {
alert("Scanning failed: " + error);
});
};
aber es funktioniert nicht auf: cordova.plugins
undefiniert istWas bin ich ??