I am using this infinite scroll library & its calling a fucntion miltiple times on scroll my code:
<table class="table table-striped table-hover inline-edit"
infinite-scroll
[infiniteScrollDistance]="2"
[infiniteScrollThrottle]="10"
(scrolled)="onScrollDown()">
onScrollDown() {
this.pageNumber += 1;
this.getContacts();
}
When it reaches viewports length it calls onScrollDown multiple times like 5/6 times