Improve this doc

Filters can be part of any api/ng.$rootScope.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

Use the same syntax for multiple arguments:

    myArray | orderBy:'timestamp':true

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

Related Topics

Related API