GithubHelp home page GithubHelp logo

cgrcnr / nginfinitescroll Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sroze/nginfinitescroll

0.0 0.0 0.0 1.42 MB

Infinite Scrolling for AngularJS

Home Page: http://sroze.github.com/ngInfiniteScroll/

License: MIT License

CoffeeScript 10.68% Shell 5.37% JavaScript 83.95%

nginfinitescroll's Introduction

Alternative project: Angular Material's md-virtual-repeat

Maintainer help needed: I'm looking for fellows that are willing to help me maintain and improve this project.


logo

Build Status

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.

Demos

Check out the running demos at the ngInfiniteScroll web site.

Version Numbers

ngInfinite Scroll follows semantic versioning.

Getting Started

  • Install it with:

    • npm via npm install --save ng-infinite-scroll
  • Import ng-infinite-scroll and angular.

     import angular from 'angular';
     import ngInfiniteScroll from 'ng-infinite-scroll';
    
  • Ensure that your application module specifies ngInfiniteScroll as a dependency:

     const MODULE_NAME = 'myApplication';
     angular.module(MODULE_NAME, [ngInfiniteScroll]);
     export default MODULE_NAME;
    
  • Use the directive by specifying an infinite-scroll attribute on an element.

     <div infinite-scroll="$ctrl.myPagingFunction()" infinite-scroll-distance="3"></div>
    

Note that the directive does not use the ng prefix, as that prefix is reserved for the core Angular module.

Detailed Documentation

ngInfiniteScroll accepts several attributes to customize the behavior of the directive; detailed instructions can be found on the ngInfiniteScroll web site.

Ports

If you use AngularDart, Juha Komulainen has a port of the project you can use.

License

ngInfiniteScroll is licensed under the MIT license. See the LICENSE file for more details.

Testing

ngInfiniteScroll uses Protractor for testing. Note that you will need to have Chrome browser.

npm install
npm run test

Thank you very much @pomerantsev for your work on these Protractor tests.

Bower

While a Bower repo has been created for legacy use, it is still recommened to use npm and a module bundler (webpack, rollup, SystemJS) to use ng-infinite-scroll.

To install using bower:

bower install ngInfiniteScroll

nginfinitescroll's People

Contributors

acelot avatar antyadev avatar bimusiek avatar binarymuse avatar decklord avatar dmitrygonchar avatar erikdonohoo avatar fishfacemcgee avatar graingert avatar kkirsche avatar matrei avatar michaelakbaraly avatar mikeescobedo avatar piotrekpa avatar pomerantsev avatar royaldark avatar sbedulin avatar sergiopvilar avatar sroze avatar tcard avatar timfjord avatar vikalpj avatar vthibault avatar xreeqz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.