Rajdeep Saha

Rajdeep Saha

  • 1.5k
  • 170
  • 27.1k

What is the alternate of limitTo in case of NgFor Angular5

Feb 26 2018 10:43 PM
In AngularJs 1, in case of ngRepeat there is syntax called limitTo which basically restrict the for loop for a certain number inspite of main array may contains more than that limitTo value. But in angular 5, limitTo has been dropped in case of ngFor. Then what is the alternative of that ?
 
Suppose i have an array of 100 elements on which i want to use ngFor. But I want to display only 20 items in that case. rest data need to display on click on details button.
 
How I can achieve this without changing any thing in my data provider? 

Answers (2)