Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use in Ionic Framework? #22

Closed
faiyazahmad opened this issue May 21, 2015 · 2 comments
Closed

How to use in Ionic Framework? #22

faiyazahmad opened this issue May 21, 2015 · 2 comments

Comments

@faiyazahmad
Copy link

I am developing a new app which require Barcode scan. I added the plugin successfully and tried to run on iOS device but could not succeeded.

@davorpeic
Copy link

Are you using actual device or trying to run it in simulator?

I'm using Ionic and csZBar and it works great. This is how I had it implemented

// Open scanner
// Calling from the view ng-click="openScanner()"
$scope.openScanner = function(){

    cloudSky.zBar.scan({
        camera: "front" // defaults to "back"
    }, function(response){
        if(response){
            alert("We got scanned!");
        }
    }, function(error){
        alert("XY Error");
    });        

};

Check your console in Safari to see if you are getting any js errors when trying to execute the plugin
davor

@feibi8597
Copy link

hi, I have a problem, if i want to use this plugin in ionic , i should inject what in controller?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants