i'm using ngx-infinite-scroll module with Angular 5. My browser is Chrome.
The onScrollDown()
action is fired when i scroll down with the scrolling bar inside my div. To make it work, i need to give a height to my content and [scrollWindow]
should be set to false:
css
.search-results {
height: 200px;
overflow: scroll;
}
template
<div class="search-results"
infinite-scroll
[infiniteScrollDistance]="5"
[infiniteScrollThrottle]="10"
[scrollWindow]="false"
(scrolled)="onScrollDown()">
<p *ngFor="let i of array">
{{i}}
</p>
</div>
But when i set [scrollWindow]
to true (which is the default setting), and remove the search-results
class (no height set then), the onScrollDown() is never fired even when i scroll down with the default right bar of my browser. Any idea why the default windows scrolling doesnt trigger the onScollDown() action? Thanks