Observables and RxJS

Let's learn about Observables and RxJS in this chapter.

Chapter learning outcomes

Now that we know what services are and how to create them, we are going to move on to looking at Observables. We are going to learn what an Observable is, what role it provides, and what makes an Observable object. Once we have discussed the theory of Observables, we will move on to looking at the RxJs library that has been added to Angular. We will look at what RxJs is and what role it provides to Angular, as well as how we can add features of RxJs to our services to make them more resilient and error-proof.

We’ve spoken a few times already about Observables and RxJs but never looked into them in great depth, including how to use them and why we use them in Angular. In this chapter, we will explore both topics in more detail.

In this chapter, we will cover the following topics:

  • Observable objects
  • How to use the Observable pattern in Angular
  • How to create Observables
  • How to use Observables
  • What RxJs is and an introduction to Reactive Programming
  • How we can use the power of RxJs in our Angular applications

There is a lot of theory to go through and a lot of concepts we need to learn and understand. By the end of this chapter, you will see the benefits that this approach brings to our Angular applications.

Client contacts manager application

📝 Note: Press the RUN button to compile and serve the application. Once the app compiles, you can see its output in the Output tab or by clicking on the URL given after Your app can be found at.

Get hands-on with 1400+ tech skills courses.