How to implement infinite scroll with RouteReuseStrategy. Always emit scrolled events.
See original GitHub issueIn our application we are using RouteReuseStrategy to reapply elements.
Intinite scroll is used with the following settings:
infiniteScroll [infiniteScrollDistance]="0" [infiniteScrollThrottle]="250"
When component is detached, window scroll event handler is still persist for infiniteScroll, causing it to emitting (scrolled) event every scroll.
Why is it emitting scrolled events when its not in a viewport?
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
How to Implement Infinite Scrolling with React.js | Pluralsight
Here in this guide, we will develop a simple custom infinite scrolling mechanism that helps us to load data based on a scroll...
Read more >Saving scroll position with RouteReuseStrategy - Medium
So, we have to implement saving the scrolls by ourselves. There may be a lot of ways here: custom directive;; component-wide provider;; custom ......
Read more >ngx-infinite-scroll event not being triggered when scroll is ...
I am trying to implement infinite scroll using ngx-infinite-scroll in an angular 4 app but it its not being triggered.
Read more >Infinite Scroll with Vue - YouTube
Want more? Explore the library at https://codecourse.comOfficial sitehttps://www.codecourse.comTwitterhttps://twitter.com/teamcodecourse.
Read more >Infinite Scroll with Vue.js and Intersection Observer - Netguru
Our Trigger component creates an Intersection Observer and emit an event when the component enters the viewport. What we need to do now...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @Omi0, I managed to make your solution work!
Tips for anyone stuck:
<router-outlet>
with the new<app-router-outlet>
that you just created from the article.changeDetectorRef.detectChanges()
after any change you make in your parent’sonDetach()
function, like so:@konstantinosftw I have even written an article about it. Scroll to 3 method. Hope it answers your question.