ionic-team / ionic-v1

The repo for Ionic 1.x. For the latest version of Ionic, please see https://github.com/ionic-team/ionic
Other
192 stars 187 forks source link

Options argument for phonegap-plugin-barcodescanner not working Ionic v1.1.0 #293

Open bburgay opened 7 years ago

bburgay commented 7 years ago

Note: If you are having problems formatting your issue please refer to this article on using markdown in Github:

https://guides.github.com/features/mastering-markdown/

Note: for support questions, please use one of these channels:

https://forum.ionicframework.com/ http://ionicworldwide.herokuapp.com/

Short description of the problem:

Options set in cordova barcode scanner scan function do not work.

What behavior are you expecting?

Passing options to the scan function should result in the options taking effect.

Steps to reproduce:

  1. Install phonegap-plugin-barcodescanner
  2. Add scan call with options
$cordovaBarcodeScanner.scan({"prompt" : "Testing...", "resultDisplayDuration" : 0})
      .then(function(barcodeData) {
        alert(JSON.stringify(barcodeData));
      }, 
      function(error) {
        // An error occurred
      }
    );
insert any relevant code between the above and below backticks

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

Which Ionic Version? 1.x or 2.x

1.1.0

Plunker that shows an example of your issue

For Ionic 1 issues - http://plnkr.co/edit/Xo1QyAUx35ny1Xf9ODHx?p=preview

For Ionic 2 issues - http://plnkr.co/edit/me3Uk0GKWVRhZWU0usad?p=preview

Run ionic info from terminal/cmd prompt: (paste output below)

[WARN] You are not in an Ionic project directory. Project context may be missing.

global packages:

@ionic/cli-utils : 1.5.0
Ionic CLI        : 3.5.0

System:

Node       : v6.9.5
OS         : Windows 10
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed
npm        : 3.10.10

cd ...

FriendOfTheNight commented 7 years ago

Updated ng-cordova.min.js from v0.1.12-alpha to v0.1.27-alpha which resolved the issue.