From the course: Angular: Creating and Hosting a Full-Stack Site

Unlock the full course today

Join today to access over 24,000 courses taught by industry experts.

RxJS and the Angular HttpClient

RxJS and the Angular HttpClient

- [Instructor] Now that we've learned about services in Angular and created our own service that our front end can use to interact with the server, it's time to take a look at the tools we'll be using to actually do that communication. In order to make network requests in Angular, there are two main tools we need to use. And these are called RxJS and HttpClient. RxJS is a library that makes working with asynchronous and event based code a lot easier and HttpClient is an Angular module that we can use to actually make the request to the server. The best way to go further in our understanding here is really just going to be to see both of these tools in action so let's do that. The first thing we're going to have to do here is open up our @module file and add our HttpClient to it. This will make it so our Angular components and services are able to inject HttpClient as a dependency. So up at the top of our file we're going to…

Contents