On-demand data loading with DataScroller
DataScroller displays the data on-demand using a scroll feature. It requires a collection of items as its value, number of rows to load, and ng-template
template tag to display the content where each item can be accessed using an implicit variable. A basic example of the DataScroller component with various browser information would be written as follows (remember, here a fluid grid is used to format the content of browser records):
<p-dataScroller [value]="basicBrowsers" [rows]="5"> <ng-template let-browser pTemplate="item"> <div class="ui-grid ui-grid-responsive ui-fluid" class="content-layout"> <div class="ui-grid-row"> <div class="ui-grid-col-3"> <img src="/assets/data/images/{{browser.code}}.png" width="100" height="80"/> </div> <div class="ui-grid-col-9"> <div class="ui-grid ui-grid-responsive ui-fluid"> ...