Unlimited Plugins, WordPress themes, videos & courses! Unlimited asset downloads! From $16.50/m
by
Lessons:2Length:9 minutes

Next lesson playing in 5 seconds

Cancel

Free Preview: How to Use Angular 2 Pipes

Introduction

01:15
  • Overview
  • Transcript

Angular has always been great at handling data. It can usually find a way to work with whatever you supply. And this has only gotten better in Angular 2. However, this flexibility means that sometimes your data doesn't look quite the way you want. Fortunately, Angular 2 has pipes that allow you to transform the data. Built-in pipes are provided for common formatting tasks, and if you need a pipe that doesn't already exist, you can create your own.

In this Coffee Break Course, you'll learn how pipes work in Angular 2 and how to use them in your projects. You'll see how to use some of the common built-in pipes, and then you'll see how to create your own pipes for use in your components.

We've built comprehensive guides to help you learn JavaScript and Angular, whether you're just getting started or you want to explore more advanced topics.

1.How to Use Angular 2 Pipes
2 lessons, 09:02

Free Lesson
1.1
Introduction
01:15

1.2
How to Use Angular 2 Pipes
07:47


1. How to Use Angular 2 Pipes

1.1 Introduction

[MUSIC] As you build apps with Angular 2, you may find that you need a way to format the data that you display. Most of the information you see displayed in an Angular app is provided dynamically. The data changes, so as a developer, sometimes we cannot display the information how we want. For example, the date format offered in JavaScript is different than what many may be used to. It is readable, but not necessarily human-friendly. As a result, we often need to transform this to something that is easier digested to users of our app. For example, the date format offered in JavaScript is different than what many may be used to. It is readable but not necessarily human-friendly. As a result, we often need to transform this to something that is easier digested by the users of our app. Angular 2 offers pipes that allow us to manage these conversions easily. Instead of us having to come up with code that formats our date, or turns our text to uppercase for example, we can use pipes to transform this content. In this Coffee Break course, we will look at how pipes work, and learn about the built-in pipes that are included in Angular 2. After that, we will learn how to build our own custom pipes, and how to use them in our projects. After this Coffee Break course, you will have a better understanding of Angular 2 pipes.