0

If I implement a 'load more' button that increases the limitTo filter in Angular.js, does the filter prevent loading the whole ng-repeat array?

What if I for example have 100 images in my ng-repeat. And i implement a limitTo filter with '9' on this. Is the user downloading the 100 images on page load or just the 9 images?

Jim Peeters
  • 2,573
  • 9
  • 31
  • 53
  • Simple enough to inspect the live html in browser dev tools and answer this yourself. Or look in browser dev tools network to see all the actual images that have been loaded – charlietfl Apr 24 '16 at 12:08

2 Answers2

2

Yes.It limits to 9 images.

Here it is from the Angular Doc:

limitTo

Creates a new array or string containing only a specified number of elements. The elements are taken from either the beginning or the end of the source array, string or number, as specified by the value and sign (positive or negative) of limit. If a number is used as input, it is converted to a string.

Sampath
  • 63,341
  • 64
  • 307
  • 441
1

Angular js will create a new array having 9 elements and iterate those 9

thaveethu gce
  • 585
  • 1
  • 9
  • 20