Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
deleted 71 characters in body
Source Link
Yoni Baciu
  • 2.7k
  • 1
  • 22
  • 29

I think this happens because myview.html is loaded into the page via AJAX and by that time the holder script already scanned the page for images.

You need to execute Holder.run() manually after the view is loaded.

Using an angular directive could be an elegant solution here. You can create a holder-img directive on the img that will run the holder code on that specific element.

<img holder-img class="img-circle" data-src="holder.js/140x140" alt="140x140">


angular.directive('holderImg', [function() { 
  function link(scope, element, attrs) {
    Holder.run({
      images: element
    });      
  }

  return {
    link: link
  };
}]);

I think this happens because myview.html is loaded into the page via AJAX and by that time the holder script already scanned the page for images.

You need to execute Holder.run() manually after the view is loaded.

Using an angular directive could be an elegant solution here. You can create a holder-img directive on the img that will run the holder code on that specific element.

<img holder-img class="img-circle" data-src="holder.js/140x140" alt="140x140">


angular.directive('holderImg', [function() { 
  function link(scope, element, attrs) {
    Holder.run({
      images: element
    });      
  }

  return {
    link: link
  };
}]);

I think this happens because myview.html is loaded into the page via AJAX and by that time the holder script already scanned the page for images.

Using an angular directive could be an elegant solution here. You can create a holder-img directive on the img that will run the holder code on that specific element.

<img holder-img class="img-circle" data-src="holder.js/140x140" alt="140x140">


angular.directive('holderImg', [function() { 
  function link(scope, element, attrs) {
    Holder.run({
      images: element
    });      
  }

  return {
    link: link
  };
}]);
added example code
Source Link
Yoni Baciu
  • 2.7k
  • 1
  • 22
  • 29

I think this happens because myview.html is loaded into the page via AJAX and by that time the holder script already scanned the page for images.

You need to execute Holder.run() manually after the view is loaded.

Using an angular directive could be an elegant solution here. You can create a ng-holderholder-img directive on the img that will run the holder code on that specific element.

<img ng-holder-img class="img-circle" data-src="holder.js/140x140" alt="140x140">


angular.directive('holderImg', [function() { 
  function link(scope, element, attrs) {
    Holder.run({
      images: element
    });      
  }

  return {
    link: link
  };
}]);

I think this happens because myview.html is loaded into the page via AJAX and by that time the holder script already scanned the page for images.

You need to execute Holder.run() manually after the view is loaded.

Using an angular directive could be an elegant solution here. You can create a ng-holder-img directive on the img that will run the holder code on that specific element.

<img ng-holder-img class="img-circle" data-src="holder.js/140x140" alt="140x140">

I think this happens because myview.html is loaded into the page via AJAX and by that time the holder script already scanned the page for images.

You need to execute Holder.run() manually after the view is loaded.

Using an angular directive could be an elegant solution here. You can create a holder-img directive on the img that will run the holder code on that specific element.

<img holder-img class="img-circle" data-src="holder.js/140x140" alt="140x140">


angular.directive('holderImg', [function() { 
  function link(scope, element, attrs) {
    Holder.run({
      images: element
    });      
  }

  return {
    link: link
  };
}]);
added 264 characters in body
Source Link
Yoni Baciu
  • 2.7k
  • 1
  • 22
  • 29

I think this happens because myview.html is loaded into the page via AJAX and by that time the holder script already scanned the page for images.

You need to execute Holder.run() manually after the view is loaded.

Using an angular directive could be an elegant solution here. You can create a ng-holder-img directive on the img that will run the holder code on that specific element.

<img ng-holder-img class="img-circle" data-src="holder.js/140x140" alt="140x140">

I think this happens because myview.html is loaded into the page via AJAX and by that time the holder script already scanned the page for images.

You need to execute Holder.run() manually after the view is loaded.

I think this happens because myview.html is loaded into the page via AJAX and by that time the holder script already scanned the page for images.

You need to execute Holder.run() manually after the view is loaded.

Using an angular directive could be an elegant solution here. You can create a ng-holder-img directive on the img that will run the holder code on that specific element.

<img ng-holder-img class="img-circle" data-src="holder.js/140x140" alt="140x140">
Source Link
Yoni Baciu
  • 2.7k
  • 1
  • 22
  • 29
Loading