From the course: Angular: Cloud-Powered Apps with Firebase

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Admin interface: View user profile

Admin interface: View user profile

From the course: Angular: Cloud-Powered Apps with Firebase

Start my 1-month free trial

Admin interface: View user profile

- [Instructor] In addition to viewing the users collection, let's also allow the admin to view individual profile data. I went ahead and added a couple of more users. If you need temporary email addresses, you can use something like tempmail.org. Heading back to our users component, we can turn the name into a navigation link. We can use the router link directive such that when the user clicks on this link it will navigate them to the profile route. And I can move the user's name inside this link here. Heading back to our application, we can see the links display now. If you try to navigate by clicking on this link, you see that the app doesn't seem to go anywhere. This is because of the route guard on the profile page. Let's modify that route guard to allow admin users. Heading to the application routing module, we'll create a new auth-guard pipe. We will call this allow only self or admin. It will take in next, which will…

Contents