Developer Guide: Templates: Filters: Using Angular Filters

Filters can be part of any api/angular.scope evaluation but are typically used to format expressions in bindings in your templates:

    {{ expression | filter }}

Filters typically transform the data to a new data type, formatting the data in the process. Filters can also be chained, and can take optional arguments.

You can chain filters using this syntax:

    {{ expression | filter1 | filter2 }}

You can also pass colon-delimited arguments to filters, for example, to display the number 123 with 2 decimal points:

    123 | number:2

Here are some examples that show values before and after applying different filters to an expression in a binding:

Related Topics

Related API