在离子默认选项卡模板外部图像将无法在仿真器和设备上加载 [英] External images in the Ionic default tab template won’t load in the emulator and on the device
问题描述
在离子的选项卡的应用程序模板中包含了一些外部图像,他们将不会加载,当我在我的Android模拟器或我的Nexus 5,打开应用程序无论是设备和emulatir确实有互联网连接,我可以加载这些图像手动在浏览器中。
The tab app template in Ionic contains a few external images, and they won't load when I open the app in my Android emulator or my Nexus 5. Both the device and the emulatir do have internet connection and I can load these images manually in the browser.
它的工作原理确定在浏览器(离子型服务)。
It works OK in the browser (ionic serve).
这就是:
ionic start myApp tabs
cd myApp
ionic serve # OK
ionic platform add android
ionic build android
ionic emulate android # Images are not loaded
ionic run android # Images are not loaded
离子服务:
<一个href="http://content.screencast.com/users/yuri_l/folders/Jing/media/e95e5f91-c732-414a-9ba5-adaf8a726dd5/00000064.png" rel="nofollow">http://content.screencast.com/users/yuri_l/folders/Jing/media/e95e5f91-c732-414a-9ba5-adaf8a726dd5/00000064.png
Android模拟器(Nexus的5):
Android emulator (Nexus 5):
<一个href="http://content.screencast.com/users/yuri_l/folders/Jing/media/a515d587-0eea-4978-809d-b800899aa9f9/00000065.png" rel="nofollow">http://content.screencast.com/users/yuri_l/folders/Jing/media/a515d587-0eea-4978-809d-b800899aa9f9/00000065.png
离子1.3.22 科尔多瓦5.0.0
ionic 1.3.22 cordova 5.0.0
我所缺少的?
推荐答案
下面是解决方案:
ionic plugin add cordova-plugin-whitelist
外部资源,将不会加载没有它。
External resources won't load without it.
这篇关于在离子默认选项卡模板外部图像将无法在仿真器和设备上加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!