Summary
In this chapter, we explored the RxJS library and its basic elements, observables.
We learned what an observable is and how it differs from a promise or a function. With that knowledge, we refactored our project to handle data with the map
operator, abstracting the implementation details of the component that will consume the service. We also learned about Angular’s async pipe and how it simplifies the management of subscription to an observable, leaving this task to the framework itself to manage.
Finally, we created a typeahead search field using RxJS to search for exercises based on the user’s typing event, using operators in order to optimize HTTP calls from our frontend. In the next chapter, we will explore the possibilities of the automated tests that we can do in our Angular application.