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

Connect the My Listings page

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

Start my 1-month free trial

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…

Contents