[英]Ionic Cordova Angular - local device images don't show in img ng-src
I am storing local images on the device (iOS) using the cordova.file.DataDirectory
location.我使用
cordova.file.DataDirectory
位置在设备(iOS) 上存储本地图像。
My rendered HTML is showing the right path to the file (and I know the file exists)我呈现的 HTML 显示了文件的正确路径(我知道文件存在)
Controller:控制器:
$scope.IMAGE_PATH = fileResult.toURL();
Template:模板:
<img ng-src="{{IMAGE_PATH}}">
Rendered Result:渲染结果:
<img ng-src="file:///var/mobile/Applications/A5804B42-6818-4695-AA9D-7EA92CAC870B/Library/NoCloud/16_556118a379a45.jpg" src="file:///var/mobile/Applications/A5804B42-6818-4695-AA9D-7EA92CAC870B/Library/NoCloud/16_556118a379a45.jpg" class="">
But my image is not showing (I get the missing image icon)但我的图像没有显示(我得到了丢失的图像图标)
Any ideas anyone?任何人的想法?
该问题是在该过程的早期创建的,因为设备本地保存的文件是一个空文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.