| Id | Name | Department | |
|---|---|---|---|
| {{ employee.id }} | {{ employee.name }} | {{ employee.email }} | {{ employee.department }} |
| Loading... | |||
The uxVirtualFor directive is an alternative way of implementing virtual scrolling.
It differs from the
Virtual Scroll component as it
does not provide a built in support for a load more button or loading additional items on scroll.
It is instead intended to be a drop-in replacement for the ngFor directive which
allows it to be used in places where the Virtual Scroll component is not suitable, for example,
within tables.
The parent element should also be given the uxVirtualForContainer directive.
The following attributes can be used on the uxVirtualForContainer directive:
The uxVirtualFor directive provides the same context properties available to
ngFor:
Context properties can be accessed by assigning them to variables within the template:
The directive also works seamlessly with observables by using the async pipe, as you
would with ngFor:
The following code can be used to create the example above: