First open the project in the terminal and execute the following code:
Cordova Plugin Add https://github.com/wymsee/cordova-imagepicker.git
Method (Methods)
Getpictures (Options)
Options
Parameters |
Type |
Explain |
Maximumimagescount |
Integer |
Maximum number of selected pictures |
Width or height |
Integer |
Filter width or height if wide or high is 0 returns the original size picture |
Quality |
Integer |
The size of the image quality, default to 100 |
code example
Module.controller (' Thisctrl ',function($scope, $cordovaImagePicker) {varOptions ={maximumimagescount:10, Width:800, Height:800, Quality:80 }; $cordovaImagePicker. Getpictures (Options). Then (function(results) { for(vari = 0; i < results.length; i++) {Console.log (' Image URI: ' +results[i]);//The return parameter is a picture address results is an array}},function(Error) {//Error getting photos });});
Reference: http://www.ionic-china.com/ngCordova/Image%20Picker.html
http://ngcordova.com/docs/plugins/imagePicker/
Ionic Open System album Mac