Inserting Users

This lesson explains how to insert a user into the database. It focuses on the UserService class and the backend implementation of the insertion operation.

In the previous lesson, we looked at the typescript and HTML files. Now, let’s take a look at the implementation of UserService and the back-end implementation for the insertion of a user.

UserService

This class is in charge of communication with the back-end through the Web API and, because of that, it has to use Angular’s HTTP service.

Example

Here is the code in the /mean_frontend/src/app/services/users.service.ts file:

Get hands-on with 1200+ tech skills courses.