Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/398.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在爱奥尼亚应用程序中读取图库中的所有图像_Javascript_Cordova_Phonegap Plugins_Hybrid Mobile App_Ngcordova - Fatal编程技术网

Javascript 在爱奥尼亚应用程序中读取图库中的所有图像

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++) { $

目前我正在使用插件。我正在手动选择图像。我的要求是像gallery应用程序一样显示手机上的所有图像

$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
到目前为止没有答案??没有人处理过这种类型的要求这是针对爱奥尼亚版本1的。您必须将此代码应用于在单击按钮读取图像时调用的函数。我希望图像应该自动读取,而不是通过在每个图像上选择来进行选择