Virtual Scroll
The virtual
directive will render all the elements, but it detach change detection for elements that are outside of the Viewport.
Create Virtual Scroll
An example in COMPONENT.template.html
.
<ng-container *ngFor="let item of items">
<hello virtual></hello>
</ng-container>
Will detach all hello components when they are not of the Viewport.
Last updated