Okay I have a code i need to get the images in my gallery went surfing the net got some examples tried to follow got no luck.
Here’s my snippet
` ionic.Platform.ready(function(){
// will execute when device is ready, or immediately if the device is already ready.
$scope.selectImage = function () {
// body...
var options = {
maximumImagesCount: 1,
width: 800,
height: 800,
quality: 80
};
ImagePicker.getPictures(options)
.then(function (results) {
for (var i = 0; i < results.length; i++) {
console.log('Image URI: ' + results[i]);
$scope.images.push(results[i]);
}
if(!$scope.$$phase) {
$scope.$apply();
}
}, function(error) {
// error getting photos
});
}
});`
also in my controller.js, in the controller am using to invoke the method above I have
.controller('profileCtrl', function($scope, $cordovaImagePicker, $ionicPlatform)
in app.js
I was trying to use ngcordova by getting the js i took from the dist folder place it in my js folder
then i add it by doing this in the app.js, also i do have the script tag for ngcordova index.html
angular.module('app', ['ionic', 'app.controllers', 'app.routes', 'app.services', 'app.directives', 'ngCordova'])
when i launch the app in ionic view and click the image container i need to change the method is not invoke.
I am wondering do I need ngcordova I wouldn’t want to use it judging I am using a framework that i know as cordova. can any one point me to example am new to cordova but i almost spun up a great app using it in two weeks its the best of the hybrids I swear.
I should mention I also remove $cordovaImagePicker and $ionicPlatform parameters in one of my test got no luck also remember a clean example would be good like a beginners one okay thank you all.