ng-easy-img-cache-webpack
v1.0.2
Published
dead simple image cacheing for angular with webpack
Downloads
3
Maintainers
Readme
ng-easy-img-cache-webpack
The Basics
- Dead simple Local Storage image caching
- Uses ngstorage-webpack under the hood (just a webpacked version of ngStorage)
Installation
Within your webpack module include dependencies
var angular = require('angular')
ngModule = angular.module('myApp', [
require('ngstorage-webpack'),
require('ng-easy-img-cache-webpack')
])
Include the ng-easy-cache
& ng-src
directives like this:
<img ng-easy-cache ng-src="cat.jpg" />
or <img ng-easy-cache ng-src="{{myVar}}" />
Config
Debug Mode
Debug mode adds green tint to images so you can disable wifi to check the caching functionality:
myModule.config(['ngEasyCacheConfigProvider',function (ngEasyCacheConfigProvider) {
//set to false for production mode & no green tint
ngEasyCacheConfigProvider.debug(true);
}])
That's it! - You're done.