【发布时间】:2017-03-08 18:03:21
【问题描述】:
我认为有以下代码:
<div class="ponkey-add-top">
<button class="button add-picture" ng-click="popover.show($event)"><i class="fa fa-plus"></i>Add picture</button><br />
<img ng-show="imgURI !== undefined" ng-src="{{imgURI}}" class="take_picture">
<label class="item item-input">
<textarea class="ponkey-add-note-textarea" ng-model="data.text" placeholder="Your note..."></textarea>
</label>
</div>
从我的图库中选择图片或拍照后,预览不会显示。这适用于 iOS 而不是 Android。现在它不能在两种设备上运行。
控制器有这个:
$cordovaCamera.getPicture(options).then(function (imageData) {
$scope.imgURI = "data:image/jpeg;base64," + imageData;
$scope.image = imageData;
$scope.popover.hide();
});
提交时,图片数据被发送到服务器,所以图片存在。
我是否忽略了什么?
【问题讨论】:
标签: cordova ionic-framework cordova-plugins