I have an Ionic project where I need the Cordova Camera plugin (which I now installed successfully). But in my project the Camera API is still not available, i.e. I get error th
Follow these steps:
1. Include ngCordova before cordova.js
You can found the same description in the docs.
2. Add your plugin on the command line
You can find this step in the docs in the section of your specific plugin.
ionic plugin add org.apache.cordova.camera
3. Remember that cordova is not available while working in the browser
So when using the $cordovaCamera.getPicture
the library is calling internally navigator.camera.getPicture
which is not available when developing in the desktop browser. Further reading
The ngCordova / Ionic team is currently working on mocks you can use to avoid problems like that.
You can download ngCordova here: http://ngcordova.com/docs/install/
Update: There is Ionic Native now, it's like ngCordova but for ES6 and TypeScript.