toxic-infinite-scroller
v1.0.4
Published
Library QuickStart package.json from the documentation, supplemented with testing support
Downloads
3
Readme
Toxic Infinite Scroller
For Angular
npm install toxic-infinite-scroller intersection-observer
import { ToxicInfiniteScrollerModule } from 'toxic-infinite-scroller';
import 'intersection-observer';
@NgModule({
imports: [ ToxicInfiniteScrollerModule ]
})
Since this lib makes heavy use of IntersectionObserver you will need to import the pollyfill for reasonable browser support
<ng-template infFor [infForOf]="items" (load)="loadMore()" let-item [infForTrackBy]="trackById">
<div>{{item}}</div>
<ng-template>
Since Angular does not support @Output
binding in structual sugar syntax we have to use it the more verbose syntax