zyra / ionic-image-loader-example

Example of ionic-image-loader
12 stars 15 forks source link

Show default image when load invalid image url #2

Open ngocongcan opened 7 years ago

ngocongcan commented 7 years ago

Hi contributors, I have used fallback attribute to identify the default image when load the image doesn't load. <img-loader src="inivalid url" fallback="https://static.pexels.com/photos/194730/pexels-photo-194730-large.jpeg" useImg></img-loader>

However, it does not show as i'd like. Can you take a look, please ? screen shot 2017-05-04 at 4 14 53 pm

ihadeed commented 7 years ago

Hey there,

Are you testing this in the browser?

At the moment this feature is not supported fully in the browser. I merged this PR yesterday that should fix this issue partially. I will add more code soon to handle this in the browser as well.

wizlif commented 7 years ago

It doesn't show the fallback on the device but shows it on the browser. Images in browser browser Images in device device