我使用了angular6的无限滚动。但它只能在第一次使用。但是,当我更改其他选项卡并滚动时,滚动功能未触发。 看到我下面的代码。请有人帮我...
<div class="row">
<tabset style="width:100%">
<tab heading="All" id="tab1" (select)="onSelect($event)"></tab>
<tab heading="Draft" (select)="onSelect($event)"></tab>
<tab heading="Published" (select)="onSelect($event)"></tab>
<tab heading="Consumed" (select)="onSelect($event)"></tab>
</tabset>
<div class="container">
<div class="row tttt" infiniteScroll [infiniteScrollDistance]="8" [infiniteScrollThrottle]="50" (scrolled)="onScroll()" [scrollWindow]="false" style="height:500px; overflow-y: scroll;">
<div *ngFor="let item of myExamList" class="col-md-4" style="margin-top: 10px;">
<div class="ibox-content" >
<div class="box-header with-border">
<a routerLink="/resouceauthoring/exam/{{item.ExamRowId}}">
<h3> {{ item.Title }}</h3>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
// Scroll Function
onScroll() {
this.currentNowPage = this.currentNowPage + 1;
if (this.maxPage >= this.currentNowPage)
{
this.ScrollBindingExamList();
}
}