From the course: Building Applications with Angular, ASP.NET Core, and Entity Framework Core

Unlock the full course today

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

Logging in

Logging in

- [Instructor] In this video, we will modify our front end and back end to support logging in. Let's begin on our front end project. Let's go over to our nav component, and lets add a new button by copying the register button on line nine and pasting it below. We'll rename it to login, and then we'll change the path to login as well. Next, lets create a new file called login.component.ts, and lets go to our register component and copy and paste that as a template. Then let's modify the class name to login component and change the template URL to login component. I'll save that, and then let's create a new file for our HTML. And once again, we'll use the register HTML as a template. Let's change the button from register to login, and then the call on ng submit on line two from auth.register to auth.login. Let's save that and close it out. Then let's go to our auth service and we'll add a login function by copying the register function and pasting it below. I'll rename it to login, and…

Contents