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
From the course: Angular: Creating and Hosting a Full-Stack Site
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Services in Angular5m 53s
-
(Locked)
RxJS and the Angular HttpClient4m 59s
-
(Locked)
Avoid CORS errors4m 10s
-
(Locked)
Connect the Listing Detail page8m 57s
-
(Locked)
Connect the My Listings page4m 34s
-
(Locked)
Connect the New Listing page4m 2s
-
(Locked)
Connect the Edit Listing page4m 30s
-
(Locked)
-
-
-