ionic-img-cache.js
function checkBgCacheStatus(element) {
      var defer = $q.defer();

      _checkImgCacheReady()
        .then(function() {
          ImgCache.isBackgroundCached(element, function(path, success) {
            if (success) {
              defer.resolve(path);
            } else {
              ImgCache.cacheBackground(element, function() {
                ImgCache.isBackgroundCached(element, function(path, success) {
                  defer.resolve(path);
                }, defer.reject);
              }, defer.reject);
            }
          }, defer.reject);
        })
        .catch(defer.reject);

      return defer.promise;
    }
function checkBgCacheStatus(element) {
      var defer = $q.defer();

      _checkImgCacheReady()
        .then(function() {
          ImgCache.isBackgroundCached(element, function(path, success) {
            if (success) {
              defer.resolve(path);
            } else {
              ImgCache.cacheBackground(element, function() {
                ImgCache.isBackgroundCached(element, function(path, success) {
                  defer.resolve(path);
                }, defer.reject);
              }, defer.reject);
            }
          }, defer.reject);
        })
        .catch(defer.reject);

      return defer.promise;
    }
function checkBgCacheStatus ( element ) { var defer = $q . defer ( ) ; _checkImgCacheReady ( ) . then ( function ( ) { ImgCache . isBackgroundCached ( element , function ( path , success ) { if ( success ) { defer . resolve ( path ) ; } else { ImgCache . cacheBackground ( element , function ( ) { ImgCache . isBackgroundCached ( element , function ( path , success ) { defer . resolve ( path ) ; } , defer . reject ) ; } , defer . reject ) ; } } , defer . reject ) ; } ) . catch ( defer . reject ) ; return defer . promise ; }
Checks elements background file cache status by element.
@param {HTMLElement} element - element with background image.
Checks elements background file cache status by element .