Member-only story
Angular Infinite Scroll — how to know scroll is near the bottom. Get the direction of the scroll.
In chat windows or similar load more data in lists scenarios, users often expect that a page automatically loads & gets more items on scroll.
My articles are open for everyone; non-member readers can read the article by clicking this Friend link.
Here is how we can do that in a very simple way…
Open your component .ts file and add this code.
Open your template .html file and add this code.
Hope this helps!
See you later 👋👋
Feel free to comment down in the comment box.
Stay connected for more articles:
https://medium.com/@AnkitMaheshwariIn
If you wouldn’t mind giving it some claps 👏 👏 since it helped, I’d greatly appreciate it :) Help others find the article, so it can help them!
Always be clapping…