Angularjs directive to show loader for image

Here you go for the directive to show loader for images in your angularjs application.

Inject the module “sesu.imageloader” in your main app module and start using it. You need to pass the loader image and the css class for your loader which gives more flexibility to customize loader based on your application’s theme.
Usage:

`<img actual-src="{{url}}" loader-src="http://preloaders.net/preloaders/712/Floating%20rays.gif" loader-class="preload" showloader >

Check the plnkr to get an idea on using it.`

[iframe src=”http://embed.plnkr.co/GchZl3B61EgFdI7oR47Z/preview” width=”100%” height=”480″ allowfullscreen=”allowfullscreen” frameborder=”0″]

Leave a Reply

Your email address will not be published. Required fields are marked *

Next article

Image fallbacks