sunsus / ngimgcache Goto Github PK
View Code? Open in Web Editor NEWImage Caching for Angular JS (imgcache.js)
License: Apache License 2.0
Image Caching for Angular JS (imgcache.js)
License: Apache License 2.0
Hi! I try to use this your library. But after including module ngImgCache
in to my app.js
file i have en error:
Module 'ionic.utils' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
Does this module required there? or it`s wrong? It works fine for me with out this 'ionic.utils module.
As i understand it can work with out this in default using?. I Create PR to remove this.
P.S Sorry for my english.
There is a bower package from this project?
It's possible to use with images accessed by CSS?
Hello I'm using your lib in a cordova project. Everything is working fine on iOS but on Android I get the following error.
saveFS is not a function
During the development in ionic and testing with chmore. The ngCache directive may in fielded with the ngSrc. After debugging in that, I found attrs.$observe('ngSrc', function(src)... may trigger before ImgCache.init() finished. I suggest to add 500 or 600 miseconds to the directive in order to make sure the ImgCache finish init before directive link function triggered.
as the code following:
.directive('ngCache', function($timeout /*inject $timeout service*/) {
return {
restrict: 'A',
link: function(scope, el, attrs) {
attrs.$observe('ngSrc', function(src) {
$timeout(function(){ // $timeout to sure ImgCache.init() finished.
ImgCache.isCached(src, function(path, success) {
if (success) {
ImgCache.useCachedFile(el);
} else {
ImgCache.cacheFile(src, function() {
ImgCache.useCachedFile(el);
});
}
});
},600);
});
}
};
});
I've HTML content in a field. Any idea how i can trigger image replace for this?
<div class="chapter" ng-bind-html="capitolo.cms_body | raw_html"></div>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.