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.

Displaying current user

Displaying current user

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

Start my 1-month free trial

Displaying current user

- [Instructor] Now that we have implemented user sign up, we need to be able to display the currently authenticated user. It will also provide a better user experience if the user gets routed to a profile page where they can see their information. Let's do that now. Start by generating a new ProfileComponent by using the CLI, ng generate component, and I will call this component profile. The new component is generated, and let's go ahead and add a new route. Head to the application routing module. The new route will be profile/:id. Where id will be the user id, and the component will be the ProfileComponent. Heading back to the login component, once the user successfully signs up, we want to take them to this new ProfileComponent. Let's go ahead and inject the router here. We can grab the user id from the response. And then, use the router to navigate the user to the profile page. That will be /profile/userid…

Contents