2 Next, we need to import that Contact entity and include it in the imports array of the root module using the forFeature() method. 2 3 Here I will implement all the methods to create, get, find, update and delete that I have used inside the controller. import { MatInputModule, Next, update tasks.service.ts file with code snippets below to add the services to consume the NestJS APIs: The above code defines a service in Angular for handling functionality-related tasks. The implementation is done as follows: The Entity class marked with the @Entity decorator corresponds to an entity in the database. The dataSource variable will contain the data of the table and the contact variable will contain the selected contact from the table. In addition, the HttpClient module is imported to make HTTP requests to the backend. 8 2 this.contact = {}; Choose npm. } @Get() 19 Create a Data Transfer Object (DTO) Schema for Adding Messages In order for our NestJS server to accept data via a POST request, we need to define a Data Transfer Object Schema. Update the app.component.html file with the following code: This code is a part of the AppComponent template. }) Choose npm. 8 Start by installing the Angular CLI by running the following command in your terminal: Next, create a new project by running the following command with the project name of your choice. 2 3 4 Opinions expressed by DZone contributors are their own. Note: Make sure to replace YOUR_DATABASE_PASSWORD with your own MySQL database password. typescript 3 by building web applications pdf.