O'Reilly logo

AngularJS: Novice to Ninja by Sandeep Panda

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13AngularJS Filters

Sometimes data stored in a web app is in a format that's different from what we want to show to the users. For example, you may store two-digit country codes in lowercase in your database, but wish to display those country codes on a web page in uppercase. This is where AngularJS filters come in. Filters, as the name suggests, help to filter or format the data to be displayed to the users.

Most commonly, filters are applied to data binding expressions in the template. But they can also be used inside controllers, services, and directives. This chapter covers filters in AngularJS. Once you have the basics covered, we'll see how to implement and unit test some simple filters in our demo app.

Filter Basics

The most common ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required