/ng-image-cache

Angular image cache module

Primary LanguageJavaScriptMIT LicenseMIT

Angular image cache module

GETTING STARTED

angular
  .module('demo', [
    'ngImageCache'
  ])
;
<ui-image ui-src="'http://localhost/images/test.png'" ui-title="'Test'"></ui-image>

Image is loaded using javascript, content is stored in DOMStorage (sessionStorage or localStorage) for next loading

CONFIGURE

Update storage

angular
  .module('demo', [
    'ngImageCache'
  ])
  .config(['ImageCacheProvider', function(ImageCacheProvider) {
    // Use localStorage instead of sessionStorage
    ImageCacheProvider.setStorage(window.localStorage)
  }])
;