Content-Length: 308189 | pFad | http://github.com/robingenz/ngx-infinite-scroll

69 GitHub - robingenz/ngx-infinite-scroll: πŸ“œ Angular directive for infinite scrolling.
Skip to content

robingenz/ngx-infinite-scroll

Repository files navigation

ngx-infinite-scroll

npm (version) npm (downloads)

πŸ“œ Angular directive for infinite scrolling.

Installation

npm install @robingenz/ngx-infinite-scroll

Import the InfiniteScrollModule:

import { InfiniteScrollModule } from '@robingenz/ngx-infinite-scroll';

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

Usage

<div
  infiniteScroll
  infiniteScrollThreshold="150px"
  [infiniteScrollDisabled]="false"
  (onInfiniteScroll)="loadMoreItems()"
>
  <div *ngFor="let item of items">{{ item }}</div>
</div>

API

Properties

Name Type Required Default Details
infiniteScrollThreshold string βœ• 200px The threshold distance from the bottom of the element to call the onInfiniteScroll output event when scrolled.The value can be either a percent, or in pixels.
infiniteScrollDisabled boolean βœ• false If true, the infinite scroll event listeners will be removed.

Events

Name Type Details
onInfiniteScroll void Emitted when the scroll reaches the threshold distance.

Example

A working example can be found here.

Changelog

See CHANGELOG.md.

License

See LICENSE.









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/robingenz/ngx-infinite-scroll

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy