As we have seen with many of the data operations covered in this chapter, there is a fairly common pattern being repeated over and over again. When an Observable is returned from an HTTP request, we convert the response to JSON and subscribe to it. The subscription then binds the Observable output to a UI element. Wouldn't it be nice if we could eliminate this repetitive coding and replace it with a simpler way to accomplish what we are wanting to do?
Not surprisingly, Angular provides us with just the right way to do that. It's called the async pipe, and it can be used like any other pipe for binding to an element on the screen. However, the async pipe is a much more powerful mechanism than other pipes. It takes an Observable or a promise as an input and subscribes to it automatically. It also handles the teardown of the subscription for an Observable without necessitating any further lines of code.
Let's look at an example of this in our application. Let's go back to the LeftNavExercises...