orizens / ngx-infinite-scroll

Infinite Scroll Directive for Angular
https://www.npmjs.com/package/ngx-infinite-scroll
MIT License
1.23k stars 223 forks source link

Global configuration: Change default values in module #362

Closed ahadjithoma closed 3 years ago

ahadjithoma commented 4 years ago

Is there any way to set the default values in module where the InfiniteScrollModule is imported?

Scenario: I want all the pages with scroll to fetch the next page when the user is on the half page. It would be very useful if I could to set the infiniteScrollDistance to 5 only once

orizens commented 3 years ago

hi @ahadjithoma you can create a component that wraps ngxis and set the value to 5.

<my-infinite />