Filters associated with other technologies, like directives and expressions, are responsible for the extraordinary expressiveness of the framework. They allow us to easily manipulate and transform any value, that is, not only just the ones combined with expressions inside a template, but also the ones injected in other components such as controllers and services.

Filters are really useful when we need to format dates and currency according to our current locale, or even when we need to support the filtering feature of a grid component. They are the perfect solution to easily perform any data manipulation.

Basic usage with expressions

To make filters interact with the expression, we just need to put them inside double curly brackets:

{{expression ...

Get AngularJS Essentials now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.