Documentation

infiniteScroll (directive in module infinite-scroll)

Description

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

Usage
<ANY infinite-scroll='{expression}'
     [infinite-scroll-distance='{number}']
     [infinite-scroll-disabled='{boolean}']
     [infinite-scroll-immediate-check='{boolean}']>
</ANY>
Parameters

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>
</div>

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


×
Download Source
Install with Bower

Select a different version: