【发布时间】:2017-03-20 21:48:15
【问题描述】:
在我的应用程序中,我有一些本地图像。在使用ionic serve 在谷歌开发者工具中进行测试时,甚至在使用 android 4.4.4 和 4.2.2 的 genymotion 模拟器中进行测试时,我都可以看到我的图像。但是当我在真正的 android 设备上安装我的应用程序时(我在三星 Galaxy S3 和三星 Galaxy Ground Neo 上尝试)我看不到我的图像。
我的文件夹结构是这样的:
- 万维网
- index.html
- 应用程序
- 书
- book.html
- 图片
- icon.png
- 书
在我的book.html 中,我尝试使用以下网址加载图片:
<img src="app/book/images/icon.png">
<img src="../../images.icon.png">
我还将 icon.png 移动到 index.html 中的根文件夹并尝试以下操作:
<img src="icon.png">
但它不起作用。
【问题讨论】:
-
如果您正在渲染 book.html,那么它应该寻找路径
images/icon.png。
标签: angularjs cordova ionic-framework