1.0.4 • Published 8 years ago

toxic-infinite-scroller v1.0.4

Weekly downloads
1
License
MIT
Repository
-
Last release
8 years ago

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