#tommy-angular-infinite-scroll Simple infinite scrolling for AngularJS
##Installation
-
With Bower :
bower install --save tommy-angular-infinite-scroll
Or download
tommy-angular-infinite-scroll.js
manually -
include
tommy-angular-infinite-scroll.js
after yourangular.js
file -
adding
tommy.infinite-scroll
as a module dependency to your application
##Useage ###Binding
<div tommy-infinite-scroll="MainCtrl.loadMore()"
tommy-infinite-scroll-distance="1"
tommy-infinite-scroll-disabled="MainCtrl.isLoadMoreDisabled">
</div>
###Note
- When scrolling to the bottom of this element , execute
tommy-infinite-scroll
's attribute. tommy-infinite-scroll-distance
is used for preload the content before user scrolls to the bottom of the element. The unit of this attribute is 'screenHeight'. For example, if it's set to1
, the container will preload2 * screenHeight
's content.- Prevent executing
tommy-infinite-scroll
's attribute by addingtommy-infinite-scroll-disabled