orizens / ngx-infinite-scroll

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

Question| How i can show loading label/animation when end of scroll down? #304

Closed ChenReuven closed 5 years ago

ChenReuven commented 5 years ago

Question:

How i can add a label of 'loading' at the end of each scroll when we load more items + re-render them on the screen (it can take a couple of second for a complex components iteration)

Actual Behavior

Its nice to have feature for this infinity scroll :)

Possible Solution

additional attribute that give u this option to the directive

Thanks, Chen.R

orizens commented 5 years ago

hi. you would have to handle it in your own way: listen to the scroll event, update the state of your component/app as "loading: true" - and render the "loading" label you want to have.