What are filters in Angular? Name a few of them.

Filters are used to format an expression and present it to the user. They can be used in view templates, controllers, or services. Some inbuilt filters are as follows. 

  • date – Format a date to a specified format.
  • filter – Select a subset of items from an array.
  • Json – Format an object to a JSON string.
  • limitTo –  Limits an array/string, into a specified number of elements/characters.
  • lowercase – Format a string to lowercase.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *