13.0.0 ā¢ Published 2 years ago
@robingenz/ngx-infinite-scroll v13.0.0
ngx-infinite-scroll
š 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.
12.1.0-dev.3b44b8a.1639752063
2 years ago
12.1.0
2 years ago
13.0.0
2 years ago
12.1.0-dev.3b44b8a.1639178733
2 years ago
12.0.0
3 years ago
0.0.1-dev.d07b040.1624655254
3 years ago
0.0.1-dev.08bd428.1624654964
3 years ago
0.0.1-dev.08bd428.1624654641
3 years ago
0.0.1-dev.2c5f7f3.1624640747
3 years ago
0.0.1-dev.74ed011.1624639976
3 years ago
0.0.1-dev.e04a5bb.1624635771
3 years ago