Skip to content

ghoullier/ng-image-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)
  }])
;