Ionic Open System album Mac

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.