i dont know what to do anymore… i’ve tried everything and i have no idea what i’m doing wrong.
im using ionic-yeoman framework and im trying to use ng-cordova plugins to get access to the camera.
at this point i just want to open the camera. i have no idea what to do next since the code doesn’t seems to do anything.
please help me!!! its been over a week and i can’t find a solution!@#$%^&*.
$cordovaCamera.getPicture(options).then(function(imageData) {
// Success! Image data is here
}, function(err) {
// An error occured. Show a message to the user
});
i copied the code from the ngCordova example. but it gives me the next error:
ReferenceError: Camera is not defined
got any idea how to fix this? i also saw you replied to my stackoverflow post. mind if i’ll add you to skype so we can help each other? realy need someone that will help me…
something more (since I wasted time, this could help someone else). You have to wait for the deviceready event before using the plugins, and that is not automatically done. See this topic :
I used the solution given by Natsu- and it actually works like a charm.