100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > cordova云相册插件_ionic 中使用 cordova camera 插件选择本地图片显示问题 -问

cordova云相册插件_ionic 中使用 cordova camera 插件选择本地图片显示问题 -问

时间:2023-12-21 02:42:04

相关推荐

cordova云相册插件_ionic 中使用 cordova camera 插件选择本地图片显示问题 -问

OS 环境是安卓5.1.1,ionic版本是1.1,cordova版本是5.4.1

使用ngCordova中的camera插件选取本地照片并显示在页面中,图片选择没有问题,用chrome调试的时候dom中已经存在img元素并且src是选中的图片,图片资源也加载完成了,但是界面中就是不显示img的图像,整个界面就像是block住了。以下是部分代码:

HTML

width="100" height="100"

style="padding: 5px;">

JS

var options = {

destinationType: Camera.DestinationType.FILE_URI,

sourceType: Camera.PictureSourceType.PHOTOLIBRARY,

saveToPhotoAlbum: true,

targetWidth: 800,

targetHeight: 800

};

navigator.camera.getPicture(function (imageURI) {

$timeout(function () {

$scope.imageList.push(imageURI);

});

}, function (error) {

//error handle

console.log("Error: " + error);

}, options);

cordova云相册插件_ionic 中使用 cordova camera 插件选择本地图片显示问题 -问答-阿里云开发者社区-阿里云...

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。