Ion Frame / Cordoba Chamber
I am new to Ionic / Cordova Android dev. I've been trying to enable the cordova camera plugin for the past few days with no results. Please help me.
What I want to do is when you slide to a certain slide, the camera is loaded and the user can take a picture. (Like snapchat)
-
How have I already loaded the camera? All the examples I've seen had to click a button to load the camera.
-
If I try the examples I get
Unprepared ReferenceError: require is not defined
error for this line in cordova.js
var channel = require ('cordova / channel');
I am using the $ ionicPlatform.ready () function to replace the deviceready function. Is this something viable?
I don't really have a lot of code for this specific problem. But if you want to see it, I'll update it.
Thank!
source to share
You seem to be missing imports for require lib.
http://requirejs.org/ you can use CDN // cdnjs.cloudflare.com / ajax / libs / require.js / 2.1.11 / require.min.js
Just turn on
<script src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.1.11/require.min.js"></script>
BEFORE you import cordova.js.
NTN
source to share
You seem to be missing requireJS. Use npm install -g requirejs
to install via nodejs
I believe it would be helpful in sorting things out for you.
https://cordova.apache.org/docs/en/3.0.0/cordova_camera_camera.md.html