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.
Delete listings with Auth
From the course: Angular: Creating and Hosting a Full-Stack Site
Delete listings with Auth
- [Instructor] All right, we've done the, my listings page, the create listings page and the edit listings page. So the last step in this section is going to be the add user authentication to the delete listing flow. So here's what that's going to look like. Inside our listing service's delete listing method, what we're going to do is we're going to say, return new Observable, and this is going to be observable any, instead of observable listings since the delete listing end point doesn't actually return a listing. And we're going to say observer. And then this dot auth, dot user, dot subscribe, pretty much the same as what we've seen anywhere else. And then user and user dot get ID token dot then token. And we're going to copy and paste this request and say this, dot HTTP dot delete. And we're going to pass the HTTP options with auth header, and we're going to pass the HTTP options with auth token to this delete request…
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)
What is Firebase Auth?2m 18s
-
(Locked)
Set up a Firebase account3m 8s
-
(Locked)
Add Firebase to Angular3m 48s
-
(Locked)
Add Firebase to hapi3m 58s
-
(Locked)
Sign in and out5m 27s
-
(Locked)
Load user listings with Auth7m 10s
-
(Locked)
Create listings with Auth3m 30s
-
(Locked)
Edit listings with Auth2m 42s
-
(Locked)
Delete listings with Auth3m 13s
-
(Locked)
-
-