
<p>
  InfiniteScroll is enabled: {{enabled}}
</p>

<button ion-button (click)="toggleInfiniteScroll()" block>
  Toggle InfiniteScroll Enabled
</button>

<ion-list>
  <button ion-item (click)="goToPage2()" *ngFor="let item of items">
    {{ item }}
  </button>
</ion-list>

<ion-infinite-scroll (ionInfinite)="$event.waitFor(doInfinite())" [enabled]="enabled" threshold="100px">
  <ion-infinite-scroll-content
    loadingSpinner="bubbles"
    loadingText="Loading more data...">
  </ion-infinite-scroll-content>
</ion-infinite-scroll>
