What problem does it solve?
Angular templates frequently require transforming values for display, such as truncating text, formatting numbers or dates, and resolving GetterOrValue types. The dbx-value-pipes library provides a cohesive set of pipes that centralize these concerns, reducing boilerplate and ensuring consistent presentation across components.
Core Features & Use Cases
- Resolve GetterOrValue<T> types with GetValuePipe and GetValueOncePipe.
- Truncate long text with CutTextPipe.
- Format currency with DollarAmountPipe.
- Date/time formatting and range pipes (dateDayRange, dateTimeRange, etc.).
- Convert values to observables for async pipelines with AsObservablePipe.
- Pretty-print JSON with PrettyJsonPipe and simple template-wide formatting.
- Easily compose pipes in templates for rich UI presentations.
Quick Start
Install the library and import the needed pipes into your Angular app. Then, use in templates like {{ value | getValue }} or {{ price | dollarAmount }}. For standalone components, import the pipes directly in the component metadata.