angular-infinite-scroll

Simple, lightweight infinite scrolling for Angular Angular (2/4+) with no other dependencies which emits and event when element has scrolled to the end
1 person uses it
Author: 6976199?v=3 thisissoon
Submitted by: 7836746?v=4 edoparearyee

Angular Infinite Scroll

Build Status Coverage Status

Simple, lightweight infinite scrolling directive for Angular (2/4+) with no other dependencies which emits and event when element has scrolled to the end.

This is a simple library for Angular, implemented in the Angular Package Format v4.0.

Install

npm i @thisissoon/angular-infinite-scroll --save

app.module.ts

` import { InfiniteScrollModule } from '@thisissoon/angular-infinite-scroll';

@NgModule({ imports: [ InfiniteScrollModule ] }) export class AppModule { } `

Example

a working example can be found inside /src/demo folder

app.component.html

<div class="foo" snInfiniteScroll (onScrollEnd)="onScrollEnd()" [offset]="100" [disabled]="disabled"> </div>

app.component.ts

` export class AppComponent { onScrollEnd() { // Do something here } }

`

Options

  • offset (number): distance in px from bottom of element to trigger onSctollEnd event (default: 0)
  • disabled (boolean): If true directive will not trigger event
comments powered by Disqus
This page was last updated 4 months ago.