- [Instructor] Now that we have created…the view of the login component,…let us see how we can get the data from our view,…to our typescript file, and then…send the request to our back-end code.…So, let's get started.…For the login view, instead of creating a reactive form,…we are going to use a template driven form.…So for that, let us import the forms module.…To import the module, we need to…go to the app.module.ts file.…And in the form section, import the forms module.…So, import,…FormsModule…from…angular, slash forms.…

Or you can just add the module inline to any file,…by writing in here, comma, and then FormsModule.…And then remove the line, 26.…Let us also write up here, components.…And then cut all the components from line 28 to 31,…and put them up here.…We imported the forms module,…but to be able to use it, we need to…include it in our imports array.…

So after the ReactiveFormsModule,…write in here, FormsModule.…And this is all you have to do in your app.module.ts file.…Now, let us go to our login.component.ts file.…

Resume Transcript Auto-Scroll

Author

Released

12/20/2018

Single-page applications (SPAs) can provide a more positive and fluid user experience, but designing and building a SPA is not without its challenges. In this course, learn how to leverage ASP.NET Web API and the Angular framework to make the work of designing and building SPAs a bit easier. Instructor Ervis Trupja first shows how to set up the app infrastructure, demonstrating how to create a Web API and Angular app, and then set up the essentials for each one. He steps through how to create the service layer with ASP.NET Web API and use Angular and Material Design to build the UI. Discover how to send requests to a Web API app, handle errors in Angular, create an authentication system using tokens, and more.