Coder Social home page Coder Social logo

ngimgcache's People

Contributors

sunsus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ngimgcache's Issues

Module 'ionic.utils' is not available!

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.

Img via CSS

It's possible to use with images accessed by CSS?

saveFS is not a function

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

ImgCache my load fielded directive may load failed when testing with chorme.

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

directive in bind field

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>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.