Filters can be added in AngularJS to format data. Filters are used to change modify the data. Following is the list of commonly used filters.
Sr.No. | Name | Description |
---|---|---|
1 | uppercase | converts a text to upper case text. |
2 | lowercase | converts a text to lower case text. |
3 | currency | formats text in a currency format. |
4 | filter | filter the array to a subset of it based on provided criteria. |
5 | orderby | orders the array based on provided criteria. |
uppercase filter
Convert the string to upper case format. All the text or string convert or print as uppercase format or capital letter format.
Example
The name is {{ lfirstName | uppercase }}
The output as : The name is PRITTY
lowercase filter
Convert the string to lower case format. All the text or string convert or print as lowercase format or small letter format.
Example
The name is {{ lfirstName | lowercase }}
The output as : The name is pritty
currency filter
This filter formats a currency filter to a number. When no currency symbol is provided, default symbol for current locale is used.
{{ expression | currency : ‘currency_symbol’ : ‘fraction’}}
Example
Price: {{ price | currency }}
The output as: Price: $158.00
filter filter
The filter filter selects a subset of an array.
{{ expression | filter : filter_criteria }}
Example
- {{ x }}
This example displays only the names containing the letter “i”.
The output as follows
Jani
Birgit
Kai
Orderby Filters
The orderBy filter sorts an array based on specified expression predicate.
{{ expression | orderBy : predicate_expression : reverse}}
Здесь доступны последние события России и всего мира.
Здесь можно прочитать важные репортажи на различные темы.
https://ecopies.rftimes.ru/
Будьте в курсе важнейших новостей каждый день .
Объективность и скорость подачи в каждом материале .
This comprehensive resource serves as an thorough guide to the world of modern video surveillance, offering valuable perspectives for both professional CCTV installers and entrepreneurs seeking to improve their protection systems.
Video Security
The site delivers a detailed analysis of remote video surveillance systems, exploring their benefits, limitations, and effective applications.