This project was generated with Angular CLI version 7.3.9.
- Copy the
virtual-scroll.component.ts
to your project - Add it to your app.modules.ts declarations's array
<app-virtual-scroll [items]="items" [itemHeight]="50" [preload]="0" [offsetBottom]="0" (update)="optimizedList = $event">
<div class="item" *ngFor="let item of optimizedList">
{{item}}
</div>
</app-virtual-scroll>