Javascript 在爱奥尼亚应用程序中读取图库中的所有图像
目前我正在使用插件。我正在手动选择图像。我的要求是像gallery应用程序一样显示手机上的所有图像Javascript 在爱奥尼亚应用程序中读取图库中的所有图像,javascript,cordova,phonegap-plugins,hybrid-mobile-app,ngcordova,Javascript,Cordova,Phonegap Plugins,Hybrid Mobile App,Ngcordova,目前我正在使用插件。我正在手动选择图像。我的要求是像gallery应用程序一样显示手机上的所有图像 $cordovaImagePicker.getPictures(options) .then(function(results,afterLoop) { var arrayItems=[]; for (var i = 0; i < results.length; i++) { $
$cordovaImagePicker.getPictures(options)
.then(function(results,afterLoop) {
var arrayItems=[];
for (var i = 0; i < results.length; i++) {
$scope.images.push(results[i]);
}
}, function(error) {
});
$cordovaImagePicker.getPictures(选项)
.then(函数(结果,后循环){
var arrayItems=[];
对于(var i=0;i
这将在弹出窗口中加载画廊图像,可以在其中选择它们。我不想要任何弹出窗口,而是在页面加载时自动读取手机中的所有图像。有人能告诉我正确的方向吗。$scope.selectImage=function(){
$scope.selectImage = function () {
var options = {
maximumImagesCount: 10, // count of images you want to select
width: 300,
height: 300,
quality: 100
};
$cordovaImagePicker.getPictures(options)
.then(function (results) {
$scope.imageList = results;
console.log('gallery data: ' + angular.toJson(results));
console.log(results);
for (var i = 0; i < results.length; i++) {
$scope.imageList.push(results[i]);
}
}, function (error) {
console.log(error);
});
}
变量选项={
MaximumImageScont:10,//要选择的图像计数
宽度:300,
身高:300,
品质:100
};
$cordovaImagePicker.getPictures(选项)
.然后(函数(结果){
$scope.imageList=结果;
log('gallery data:'+angular.toJson(results));
控制台日志(结果);
对于(var i=0;i