Chapter 9. User Registration and Account Edit
In this chapter, we'll be adding a couple more account-related features that are still missing: user registration and edit user info.
User Registration
To implement a User Registration logic, we need to take care of the following tasks:
- Create a
UserViewModel
to send and receive data from and to the Web API, just like we did with items back in Chapter 2, ASP.NET Controllers and Server-Side Routes - Add the
Get
,Add
,Update
, andDelete
RESTful methods to theAccountsController
Web API interface - Handle all these methods in Angular 2 by updating the
AuthService
class - Create a
UserEditComponent
class in our Angular 2 client to host the registration form, hooking it to theAuthService
accordingly - Update the other Angular 2 components, together with the existing client-side routing structure, in order to properly integrate it within the application workflow
Let's get it done.
UserViewModel
Right-click on the /ViewModels/
folder and add a new...