I want to add Cordova plugins into my ionic app. But it seems that it isn't working.
I will walk you through the steps I took:
Can someone please help me with that?
You can add the plugin with
cordova plugin add https://github.com/wildabeast/BarcodeScanner.git
then use the plugin in your page like this
module.controller('BarcodeCtrl', function($scope, $cordovaBarcodeScanner) {
document.addEventListener("deviceready", function () {
$cordovaBarcodeScanner
.scan()
.then(function(barcodeData) {
// Success! Barcode data is here
}, function(error) {
// An error occurred
});
)};
This example and more information are available at http://ngcordova.com/docs/plugins/barcodeScanner/
See also https://blog.nraboy.com/2014/09/implement-barcode-scanner-using-ionic-framework/