Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

[SOLVED] Camera is not defined when using $cordovaCamera

$
0
0

Rikkie,

I want to make sure that that you tried this. I've just faced the 'Camera is not defined ' again:

1.

"refresh" the camera plugin by typing (android/ios - up to you)

cordova plugin rm cordova-plugin-camera
ionic platform rm android
ionic platform add android
cordova plugin add cordova-plugin-camera

2.
I am running the app in a real device, I am using chrome console to debug and type 'window.cordova' or even 'Camera' on chrome's console and the result was undefined which means that cordova wasn't loaded correctly.

Then I've noticed that in my index.html I removed the call to:

<script src="cordova.js"></script>

I've just added the piece of code above and now my code is like this:

<script src="lib/ngCordova/dist/ng-cordova.js"></script>
<script src="cordova.js"></script>
<script src="js/app.js"></script>

Things are working properly.

Please let us know if you have succeded!


Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>