Sunday, August 13, 2017

limitTo filters in angular

Limits an array/string, into a specified number of elements/characters.

  • Arrays: it returns an array containing only the specified number of items.
  • Strings: it returns a string containing, only the specified number of characters.

Syntax
         {{ Value | limitTo : limit : begin }}

limit : A number, specifying how many elements to return
begin: Optional. A number specifying where to begin the limitation. Default is 0.

Example:

No comments:

Post a Comment