Infinite scrolling for AngularJS
Want to see pretty graphs? Log in now!
npm install ng-infinite-scroll
|5||downloads in the last week|
|39||downloads in the last month|
|Last Published By|
|Version||1.0.0 last updated a year ago|
ngInfiniteScroll is a directive for AngularJS to evaluate an expression when the bottom of the directive's element approaches the bottom of the browser window, which can be used to implement infinite scrolling.
Check out a running demo at the ngInfiniteScroll web site.
ngInfinite Scroll follows semantic versioning and uses the following versioning scheme:
- Versions starting with 0 (e.g. 0.1.0, 0.2.0, etc.) are for initial development, and the API is not stable
- Versions with an even minor version (1.0.0, 1.4.0, 2.2.0, etc.) are stable releases
- Versions with an odd minor version (1.1.0, 1.3.0, 2.1.0, etc.) are development releases
The download page allows you to pick among various versions and specify which releases are stable (not including pre-release builds).
- Download ngInfiniteScroll from the download page on the ngInfiniteScroll web site
Include the script tag on your page
Ensure that your application module specifies
infinite-scrollas a dependency:
Use the directive by specifying an
infinite-scrollattribute on an element.
<div infinite-scroll="myPagingFunction()" infinite-scroll-distance="3"></div>
Note that neither the module nor the directive use the
ng prefix, as that prefix is reserved for the core Angular module.
ngInfiniteScroll accepts several attributes to customize the behavior of the directive; detailed instructions can be found on the ngInfiniteScroll web site.
ngInfiniteScroll is licensed under the MIT license. See the LICENSE file for more details.
ngInfiniteScroll uses Testacular for its unit tests. Note that you will need PhantomJS on your path, and the
grunt-cli npm package installed globally if you wish to use grunt (
npm install -g grunt-cli). Then, install the dependencies with
grunt test- continually watch for changes and run tests in PhantomJS and Chrome
npm test- run tests once in PhantomJS only