我是 Ionic 2 的新手,我的应用程序中的图像存在一些问题。 在线搜索我了解到图像必须放在应用程序内的/src/assets 文件夹中。 (正确吗?)
图像使用 ionic serve
和 ionic lab
命令工作正常,但在模拟设备中或在 iPad 上使用 Ionic View 它们不会显示!
我在代码中引用图像:
<img src="../assets/img/ringing.png" class="circle_icons">
我该如何解决这个问题?
(下面是问题的部分截图)
Screenshot of the simulator with problems displaying images
Screenshot of the ionic serve
without problems displaying images
最佳答案
将图像放入 Assets 文件夹后,只需像这样引用它们即可。
<img src="assets/images/MiTUCson-quick-search.png" alt="Consulta Rapida"
关于android - 图像不显示在 App IONIC 2 的构建中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42752532/