infiniteScroll (directive in module infinite-scroll)


infiniteScroll allows you to specify behavior when the bottom of an element nears the bottom of the browser window.

<ANY infinite-scroll='{expression}'

Loading the Module

The infiniteScroll directive lives inside the infinite-scroll module; to get access to it, ensure that your application's own module includes infinite-scroll as a dependency (in addition to any other dependencies):

var myApp = angular.module('myApp', ['infinite-scroll']);

Typical Usage

Typically, you will use the infiniteScroll directive on an element that contains another element that uses ngRepeat to show a series of elements based on an array (or object); the expression you pass in to the infinite-scroll attribute will generally add additional elements to the array, expanding the ngRepeat.

<div infinite-scroll="addMoreItems()">
  <div ng-repeat="item in items">Item number {{$index}}: {{$item}}</div>

For an example of how you can implement this pattern, see the demos.

Download Source
Install with Bower

Select a different version: