I utilized the ion-tab
element to showcase a page (inboxitem
) which encompasses ion-list
and makes use of ion-infinite-scroll
.
The following code snippet resides in inboxitem.html
<ion-content class="inbox can-swipe-list">
<ion-list>
<ion-list-header>
<ion-select [(ngModel)]="selectedOption" [selectOptions]="filterOptionSettings" (ngModelChange)="getFilteredList()">
<ion-option value="{{option.value}}" *ngFor="let option of listInboxFilterOptions; let i=index" [selected]="i==0">{{option.name}}</ion-option>
</ion-select>
</ion-list-header>
<ion-item-sliding *ngFor="let list of inboxList; let j=index">
<ion-item class="listWithReason" tappable (click)="ViewPopupDetails(j)">
<h2>
<span>{{list.fullname | filterpipes:'manipulatename'}}<br /><small>{{list.leavename}}</small></span>
<div> <ion-icon md="md-calendar" ios="md-calendar"></ion-icon> {{list.fromdate}}{{list.todate!=null ? " to ":" " }}{{list.todate}}</div>
</h2>
<p *ngIf="list.reason!=''">{{list.reason}}</p>
</ion-item>
<ion-item-options side="right" *ngIf="list.empphone=='' || list.empphone==null">
<button ion-button color="grey" class="no-phone">No phone</button>
</ion-item-options>
</ion-item-sliding>
<ion-item class="item-empty-row" *ngIf="!inboxList.length > 0">
{{noRecordsFound}}
</ion-item>
</ion-list>
<ion-infinite-scroll *ngIf="infiniteLoading" (ionInfinite)="loadInboxList(false)" distance="1%">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-content>
ISSUE
- Initially, 20 records get loaded.
- Upon scrolling, another set of 20 records load.
- However, upon further scroll, only a spinning animation appears with no additional records loading. It seems that during the second scroll, the
loadInboxList
method isn't triggered at all. Hence, it indicates that there's nothing wrong within theloadInboxList
method since it doesn't get called on the second scroll.
My ionic and cordova versions
Ionic Framework: 3.5.0
Ionic App Scripts: 1.3.9
Angular Core: 4.1.3
Angular Compiler CLI: 4.1.3
Node: 6.10.3
Any assistance provided will be greatly acknowledged