无法在离子2中查看图像 [英] Could not able to view image in ionic 2
本文介绍了无法在离子2中查看图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在我的应用中添加图片,我将我的图片存储在myApp / www / build / img.image.png
I am trying to add image in my app, i stored my image locally in my myApp/www/build/img.image.png
我的html是
<div text-center>
<img style="height: 100%; width: 20% " src="/www/build/img/image.png">
<p >Powered By yokesh</p>
</div>
我得到这样的输出
在我的控制台中我得到了
And in my console i get
我的离子信息
Your system information:
Cordova CLI: 6.1.1
Ionic Framework Version: 2.0.0-beta.6
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Mac OS X El Capitan
Node Version: v4.4.3
Xcode version: Not installed
有人可以提供帮助我来修理这个
Could someone help me to fix this
推荐答案
尝试不用 / www / build /
<div text-center>
<img style="height: 100%; width: 20% " src="img/image.png">
<p >Powered By yokesh</p>
</div>
这篇关于无法在离子2中查看图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文