problems with cordova camara ionic


Friends I'm trying to use the camera with ionic this is the controller for the camera but when I run it, I get the error: ionic.bundle.js: 20434 ReferenceError: Camera is not defined and I have removed the plugin platforms and nothing. what can i do

.controller('camaraCtrl', function($scope, $cordovaCamera) {
    var options = {
        destinationType: Camera.DestinationType.DATA_URL,
        encodingType: Camera.EncodingType.JPEG
    $scope.PictureUrl = '';
    $scope.TomarFoto = function() {
            .then(function(data) {
                console.log('camara' + angular.toJson(data));
                 $scope.PictureUrl = "data:image/jpeg;base64," + data;
            }, function(error) {
                console.log('camara err' + angular.toJson(data));
asked by frd 02.10.2016 в 21:31

1 answer


Make sure you have the correct packages installed, I infer that you are running this on the web, install it on your cell phone and try it out.

With genymotion he gave me some problems, and running on serve me that same error mark, but better run it on your cell phone so that it works.

cordova run android
answered by 11.10.2016 / 22:20