Angular Pipes-1
1. Uppercase Pipe (uppercase)
Description: This pipe converts all characters in a string to uppercase. It is useful for headers, labels, or emphasizing specific status codes in a UI.
Code Example:
2. Lowercase Pipe (lowercase)
Description: This pipe converts all characters in a string to lowercase. It is frequently used for formatting email addresses or technical keys that must be lowercase for consistency.
3. Titlecase Pipe (titlecase)
Description: This pipe capitalizes the first letter of each word and converts the rest to lowercase. It is ideal for formatting human names or article titles stored as raw text.
Code Example:
4. Date Pipe (date)
Description: This is a highly flexible pipe used to format date objects, timestamps, or ISO strings. It uses pre-defined aliases or custom format strings to meet specific regional requirements.
Detailed Parameters:
- 'shortDate':
M/d/yy(e.g., 1/11/26) - 'mediumDate':
MMM d, y(e.g., Jan 11, 2026) - 'longDate':
MMMM d, y(e.g., January 11, 2026) - 'fullDate':
EEEE, MMMM d, y(e.g., Sunday, January 11, 2026) - 'shortTime':
h:mm a(e.g., 11:55 PM)
Code Example:
5. Currency Pipe (currency)
Description: It transforms numbers into local currency formats. It handles the currency symbol, the grouping separator (commas/periods), and the decimal precision.
Detailed Parameters:
- currencyCode: The ISO 4217 code (e.g.,
'USD','EUR','TRY'). - display:
'symbol'(default),'symbol-narrow'(e.g.,$instead ofUS$),'code', or'name'. - digitsInfo:
{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}(e.g.,'1.2-2').
Code Example: