From the course: Angular: Creating and Hosting a Full-Stack Site
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Connect the My Listings page
From the course: Angular: Creating and Hosting a Full-Stack Site
Connect the My Listings page
- [Narrator] The next page that we're going to connect to our server is the my listings page. Now there are two pieces of functionality on this page that need to make requests. The first is that we actually need to load the user's listings in the first place. And the second is that we need to delete listings whenever the user clicks the delete button on a given listing. So just like with our listing detail page, let's start off by adding the corresponding methods for these two tasks to our listing Service. So let's open up our listing Service here. And the first method we're going to add is going to be called get listings for user. This will load the user's listings for the my listings page. And this is going to return an observable that calls its callback with a listing array. And for this, we're just going to say return this dot http dot get. And this is going to return a listing array as well. And the URL we want 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)
-
-
-