(滚动)=“onScrollDown()”被多次调用 - Angular 2

时间:2016-07-29 07:02:14

标签: angularjs angular infinite-scroll nginfinitescroll

我正在使用this infinite scroll library&它在滚动我的代码时呼吁成功多次:

<table class="table table-striped table-hover inline-edit"
    infinite-scroll
    [infiniteScrollDistance]="2"
    [infiniteScrollThrottle]="10"
    (scrolled)="onScrollDown()">
onScrollDown() {
      this.pageNumber += 1;
      this.getContacts();
}

当它达到视口长度时,它会多次调用onScrollDown,如5/6次

0 个答案:

没有答案