0.0.1 • Published 9 years ago
whenscrolled v0.0.1
whenscrolled
Simple directive which allows to execute callback when user scrolls towards end of the scrollable height. This is very useful if you want to implement infinite scrolling.
usage
In your html
<ul when-scrolled="loadMore()">
<li ng-repeat="i in items"></li>
</ul>
In your javascript controller:
require('whenscrolled');
function Controller($scope) {
$scope.loadMore = function () {
// will be called when user scrolled towards the bottom of availble height
}
}
see also
https://github.com/anvaka/an - describes idea behind CommonJS friendly angular packages
install
With npm do:
npm install whenscrolled
license
MIT
0.0.1
9 years ago