Skip to content

srph/angular-infinite-scroll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular-infinite-scroll

Build Status Bower version MIT license SemVer Author | Shields.io

A simple infinite scroll solution for AngularJS weighing < 1 KB (minified).

Content

Getting Started

Getting started is very easy!

Requirements

  • AngularJS >=v1.2.0 (Should work with)
  • jQuery (at least) >=v.1.7 (Planned in the future to be removed)

Installation

angular-infinite-scroll is available on [Bower]:

$ bower install angular-srph-infinite-scroll --save

* The purpose of the --save argument is to add it your bower file's dependencies.

angular-infinite-scroll is also available on [CDN(s)]:

  • Raw GIT
<script src="https://cdn.rawgit.com/srph/angular-infinite-scroll/master/dist/angular-srph-infinite-scroll.js"></script>
<!-- min -->
<script src="https://cdn.rawgit.com/srph/angular-infinite-scroll/master/dist/angular-srph-infinite-scroll.min.js"></script>

Include the script to your HTML file after jQuery and AngularJS (must be in proper order).

<!-- other scripts -->
<script src="/path/to/jquery.js"></script>
<script src="/path/to/angular.js"></script>
<script src="/path/to/angular-srph-infinite-scroll.js"></script>

Add the library module to one of your app module's dependencies.

angular.module('myApp', [/** other dependencies */, 'srph.infinite-scroll']);

Usage

Use the directive on a container element.

<div srph-infinite-scroll="callback()"
  {disabled="true"}
  {container="true"}
  {throttle="0"}
  {threshold="200"}>
  <!-- your ng-repeat, typically -->
  <div ng-repeat="apple in apples"> {{ apple.name }} </div>
</div>

* The { .. } enclosures indicate that the parameter is optional.

API

Head over to the API Documentation to see accepted parameters, and how to use each.

Examples

Head over to the examples page to help you get started!

Contribution

All contributions are appreciated. Please simply file an issue first for any inquiry, proposal, or question to avoid closed pull-requests; useless work. Thanks!

=========      ================
| issue |  ->  | pull-request |
=========      ================

Pull-requests with test or without are both appreciated!

Building

Please check docs/building

Alternatives

Changelogs

See the CHANGELOGS.md

Acknowledgement

Primarily motivated and almost based on sroze/ngInfiniteScroll.

angular-infinite-scroll © 2014+, Kier Borromeo (srph). Released under the MIT License.

srph.github.io  ·  GitHub @srph  ·  Twitter @_srph