I’m loading normally my images with ng-src but some places the cellular network doesn’t work pretty good, for that i need put some image before or while the image from data source is loading.
Put your image in a div or span and add a fixed background image for that container.
The loaded image should overlay the background image if it is loaded.
You could also add a directive to the container and listen to the ‘onload’ event of the containing image.
It would be done like this:
- container around your image
- add default backgroundimage via class
- add directive that listens on image ‘onloaded’
- if onloaded remove class from container
1 Like
For now the div on background works perfectly, later i go to implement on a directive.
Thanks