Ionic + ngCordova(ImagePicker)无效

时间:2016-06-02 15:53:41

标签: javascript angularjs cordova ionic-framework ngcordova

不知道我做错了什么,你可以帮我解释一下代码吗? 科尔多瓦6.2.0
离子1.7.15

纳克单击=" getImages()"手机关闭应用程序,在谷歌上调试" chrome:// inspect /#devices"申请在第940行(cordova.js)停止:

var msgs = nativeApiProvider.get().exec(bridgeSecret, service, action, callbackId, argsJson);

应用:

angular.module('starter', ['ionic', 'ngCordova'])


控制器:

.controller('ProfileCtrl', function($scope ,$cordovaImagePicker, $ionicPlatform)


$scope.getImages = function() {


$ionicPlatform.ready(function() {

    var options = {
        maximumImagesCount: 10,
        width: 800,
        height: 800,
        quality: 80
    };

    $cordovaImagePicker.getPictures(options).then(function(results) {
        for (var i = 0; i < results.length; i++) {
            console.log('Image URI: ' + results[i]);
        }
    }, function(error) {
        console.log('error');
    });

});

};

0 个答案:

没有答案