如何在离子骨架+ cordova中显示local://图像? [英] How to display a local:// image in ionic framework + cordova?

查看:157
本文介绍了如何在离子骨架+ cordova中显示local://图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何显示本地图片,包装在Cordova容器中,使用Ionic( http://ionicframework.com) / docs / )?



当应用在设备上运行时,我目前遇到此错误:



GET unsafe:local:///img/thumbs/myImage.jpg未处理的协议



我的Cordova应用程式专为BlackBerry 10 & Android使用离子框架。该应用程序使用以下模板显示使用Cordova应用程序本身打包的图片:

 < img ng-src =img /thumbs/{{img.path}}ng-click =fooBar(img)/>为什么会出现此错误?



< >解决方案

我发现这是有关BlackBerry 10支持的离子框架的当前限制。我在此处记录了一个错误: http://github.com/driftyco/ionic/issues/1066



为了解决这个问题,我已经手动编辑离子图书馆,以支持本地协议。


Does anyone know how to display local images, packaged inside a Cordova container, using Ionic (http://ionicframework.com/docs/)?

I am currently getting this error when the app runs on a device:

GET unsafe:local:///img/thumbs/myImage.jpg Unhandled Protocol

My Cordova app is built for BlackBerry 10 & Android using ionic framework. The app displays an image that is packaged inside the Cordova app itselfusing the following template:

<img ng-src="img/thumbs/{{img.path}}" ng-click="fooBar(img)"/>

Why is this error occurring?

解决方案

I've discovered this is a current limitation of the ionic framework regarding BlackBerry 10 support. I've logged a bug here: http://github.com/driftyco/ionic/issues/1066

To fix this, I've since manually edited the ionic library to include support for the local protocol.

这篇关于如何在离子骨架+ cordova中显示local://图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆