I searched high and low and could not get a direct answer or make my code work.
I have an existing project Angularthat has been launched using yeomanwith Angularand settings PhoneGap. My setup uses yoand bowerto generate the files.
I tried to import some cordova plugins to check how the camera or the date picker is and see if it works on the device, but this is not the way the calling function was always said to be undefined.
So, with the current setup, I call the code below in one of my submodules
navigator.camera.getPicture(onSuccess,onFail,{sourceType:1,quality:60});
This does not work, so I tried other tutorials, and also tried ngCordova, which is a wrapper class for angular. Below is what it looks like in my index.html
<script src="phonegap.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/angular-animate/angular-animate.js"></script>
<script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
<script src="bower_components/angular-ui-router/release/angular-ui-router.js"></script>
<script src="bower_components/collide/collide.js"></script>
<script src="bower_components/ionic/release/js/ionic.js"></script>
<script src="bower_components/ionic/release/js/ionic-angular.js"></script>
<script src="bower_components/json3/lib/json3.js"></script>
<script src="bower_components/angular-translate/angular-translate.js"></script>
<script src="bower_components/pouchdb/dist/pouchdb-nightly.js"></script>
<script src="bower_components/angular-pouchdb/angular-pouchdb.js"></script>
<script src="bower_components/proj4/dist/proj4.js"></script>
<script src="bower_components/ngCordova/dist/ng-cordova.js"></script>
ng-cordova ,
<script src="cordova.js"></script>
cordova.js phonegap.js?