From the course: Angular: Building an Interface

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Filtering dates with pipes

Filtering dates with pipes - Angular Tutorial

From the course: Angular: Building an Interface

Start my 1-month free trial

Filtering dates with pipes

- [Instructor] Pipes are filters that let you change the way that data is displayed in your templates. They're pretty easy to use, so let's say that, for example, I wanted to change this pet name so that it appeared as uppercase. I know that I can do that with CSS, but Angular does offer a set of filters like uppercase and lowercase that allow you to do that pretty simply. So if I just put in a pipe, or a vertical sort of straight line, and then the word uppercase, then you can see that the text on the right appears as uppercase. Now, that's not particularly useful, but one of the pipes that are pretty useful are a pipe for managing dates. There's also a pipe for managing currency, as well as percentages, but I like the one that lets you manage dates because it'll let you change military dates like this into something a little more readable. So to do that, let's go ahead and take this one out of here, and we'll go to this appointment date here, and add ourselves a pipe. So that is to…

Contents