Using formatters as filters

Formatters are helper tools to view your data differently from how they are stored in the model. Angular has built-in formatters, for example, Date to format date-times, Currency to format money data, and LimitTo to limit the view to a certain number of results. The Filter class displays items based on whether they satisfy the criteria set up in the filter. Sorting works through an orderBy attribute in ng-repeat. In this recipe, we will show you how to use filters to make different views on your data possible. You can follow along with the code in the project angular_formatter.

How to do it...

The job listing is now preceded by an input field; when you start typing the job type, the list of only those jobs that start ...

Get Dart: Scalable Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.