Reputation: 23
I want to achieve a function that load more data when the scroll move to the bottom. We used the ngx-infinite-scroll plug-in (https://github.com/orizens/ngx-infinite-scroll) to implement it ,but it not working.
it will triggle onScrollDown()
function to load more data when the scroll move to the end.
it triggled the onScrollDown()
function when the scroll move to the middle approximately
<div class="row" infinite-scroll [infiniteScrollDistance]='0'(scrolled)="onScrollDown()">
...show-list code...
</div>
onScrollDown()
is ok, and i set infiniteScrollDistance to 0 but it not work.
So ,how can i fix it ?thanks in advance.
Upvotes: 1
Views: 5210
Reputation: 960
Try using outer container with parameters
[fromRoot]="true"
[infiniteScrollDistance]="0.1"
Upvotes: 1