AngularJS limitTo Filter
AngularJS limitTo Filter
The limitTo filter is used to return an array or a string containing only a specified number of elements.
For your Information:-
When it is used for arrays, it returns an array containing only the specified number of items.
When it is used for strings, it returns a string containing, only the specified number of characters.
When it is used for numbers, it returns a string containing only the specified number of digits.
When it is negative numbers, it returns elements starting from the end of the element, instead of the beginning.
Syntax:-
{{ object | limitTo : limit : begin }}
Further Explanation:-
Value | Description |
---|---|
limit | A number, specifying how many elements to return |
begin | Optional. A number specifying where to begin the limitation. |