0

I have a list having 100 values and i need to display first 10 values by iterating the list in angular datatable?

<tr *ngFor="let i of arr">
  <td>{{i}}</td>
</tr>
  • You have an army of `Pipes` which are applicable to your `Arrày`. Moreover, you can create your customize pipe adapted to your very specific processing. – Nadhir Houari Sep 19 '20 at 08:51

1 Answers1

1

Like Doc of Angular you can use SlicePipe https://angular.io/api/common/SlicePipe

<tr *ngFor="let i of arr | slice:0:10">
  <td>{{i}}</td>
</tr>

OR

Try this

<tr *ngFor="let i of arr.slice(0, 10)">
  <td>{{i}}</td>
</tr>

Hope useful

A.khalifa
  • 2,366
  • 3
  • 27
  • 40