ng-lazy-load-image

0.1.5 • Public • Published

jocLazyImageLoad

NPM

npm install

npm install ng-lazy-load-image --save-dev

使用方法:

添加依赖: angular.module('my-app',['joc.lazyLoadImage'])

<img lazy-img="https://angularjs.org/img/AngularJS-large.png" loaded-class="loaded" class="pre-load"/>
  • lazy-img* : 懒加载图片地址
  • class : 初始样式,完成后会被替换为loaded-class
  • loaded-class : 图片加载完成后切换为此样式

Demo:ng-lazy-load-img

Update :

  • 0.1.4 : FIXED Bug and update README
  • 0.1.1 : 更新README
  • 0.1.0 : 函数节流,对scroll事件去抖

Package Sidebar

Install

npm i ng-lazy-load-image

Weekly Downloads

3

Version

0.1.5

License

MIT

Last publish

Collaborators

  • jesusalexander