List various types of filter in Angular 6?
A filter is used in Angular 6 to help change data through the UI without changing its format.
Here are the different types of filters in Angular 6
Number | Used to format numeric data as text separated with commas and also fractions. |
Currency Filter | A specific data value can be specified in a particular currency format and fractions. |
Date | Used to format dates in a string as per different date formats. |
Uppercase | Converts string to upper case. |
Lowercase | Converts string to lower case. |
Filter Type | Filters an array based on a particular criterion and returns a new array. |
orderBy | Used to sort an array as per a particular predicate expression. |
JSON | Converts JavaScript object into a JSON string |
limitTo | Returns a new array containing the specified number of elements from an existing array. |
BY Best Interview Question ON 18 Aug 2020