In my angular 4 application I need to use ngFor with less than conditon. I mean I do not want to show all the item of sampleArray
, instead I want to display only first 10 items, just like in normal java script we have i < sampleArray.length
or i < 10
, etc these kind of conditions I want to use in ngFor, is it possible?
<li *ngFor="let a of sampleArray">
<p>{{a.firstname}}</p>
<p>{{a.lastname}}</p>
</li>