message: chore(demo): fix virtual scroll example
  closes
diff: -import { Component, ChangeDetectionStrategy } from '@angular/core';
  +import { ChangeDetectionStrategy, Component } from '@angular/core';
  import { HttpClient } from '@angular/common/http';
  @Component({
  @@ -16,8 +16,8 @@ import { HttpClient } from '@angular/common/http';
  bindLabel="title"
  bindValue="thumbnailUrl"
  placeholder="Select photo"
  - (scroll)="scroll($event)"
  - (scrollToEnd)="fetchMore($event)">
  + (scroll)="onScroll($event)"
  + (scrollToEnd)="onScrollToEnd()">
  <ng-template ng-header-tmp>
  <small class="form-text text-muted">Loaded {{photosBuffer.length}} of {{photos.length}}</small>
  </ng-template>
  @@ -36,7 +36,8 @@ export class VirtualScrollComponent {
  numberOfItemsFromEndBeforeFetchingMore = 10;
  loading = false;
  - constructor(private http: HttpClient) {}
  + constructor(private http: HttpClient) {
  + }
  ngOnInit() {
  this.http.get<any[]>('https://jsonplaceholder.typicode.com/photos').subscribe(photos => {
  @@ -45,19 +46,12 @@ export class VirtualScrollComponent {
  });
  }
  - fetchMore() {
  - const len = this.photosBuffer.length;
  - const more = this.photos.slice(len, this.bufferSize + len);
  - this.loading = true;
  - // using timeout here to simulate backend API delay
  - setTimeout(() => {
  - this.loading = false;
  - this.photosBuffer = this.photosBuffer.concat(more);
  - }, 200)
  + onScrollToEnd() {
  + this.fetchMore();
  }
  - scroll( { end } ) {
  - if (this.loading) {
  + onScroll({ end }) {
  + if (this.loading || this.photos.length === this.photosBuffer.length) {
  return;
  }
  @@ -65,4 +59,15 @@ export class VirtualScrollComponent {
  this.fetchMore();
  }
  }
  +
  + private fetchMore() {
  + const len = this.photosBuffer.length;
  + const more = this.photos.slice(len, this.bufferSize + len);
  + this.loading = true;
  + // using timeout here to simulate backend API delay
  + setTimeout(() => {
  + this.loading = false;
  + this.photosBuffer = this.photosBuffer.concat(more);
  + }, 200)
  + }
  }
  