View on GitHub

Angular-image-fallback

Utility to work with loading images and handling image error, has image-holder to handle errors in image loading and image-loading for images loading placeholders.

Download this project as a .zip file Download this project as a tar.gz file

Angular Image Fallback

Angular directives that handles image loading, it has image-holder to handle errors in image loading and image-loading for placeholder while the image is being loaded.

Bower Download

bower install angular-image-fallback

Installation

  1. Download and import the plugin script.
    <script src="lib/angular-image-fallback/angular.img-fallback.min.js"></script>
  2. Add angularImgFallback to your angular app module dependencies list.
    angular.module('myAngularApp', ['angularImgFallback']);
  3. Add the image attribute to your img
    <img image="{{'path/to/img.jpg'}}" />

Usage

Just add the image attribute to your <img /> tags
<img image="{{'path/to/img.jpg'}}" />
Make sure you don't use ng-src as your image src attribute.

Advanced options

Example:

Icons license

Icons are provided from http://icomoon.io/ under the GNU General Public License v3.0
http://www.gnu.org/licenses/gpl.html