I had the same issue with relative paths
<img src="../assets/img/vis_reco.png">
does work with ionic serve / and also with livereload in the emulator (e.g. from src/pages/home/home.html ) But not on the device.
Don't use relative paths for images !!!
<img src="assets/img/vis_reco.png">
works for me with Ionic (v3) and also angular typescript apps.
On the device (ionic cordova run
) with ionic serve
and also with ng s
(angular apps)
used dir tree:
you can see an (official) example in the ionic conference starter, try:
ionic start ionicConf conference
(btw: same quetiosn & answer here: https://forum.ionicframework.com/t/images-not-displayed-on-device/89145 )
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…