.NET Core 2.0 with Angular 4 and MySQL
- From this point onwards, we are going to dive into the client side of the application to consume the web API part and show the results to the user by using angular components and many other features.
- NET Core WebApi project – Handling the POST, PUT, and DELETE requests – – This post is divided into several sections: – – First, we are going to install the Angular CLI (Angular Command Line Interface) which will help us a lot with the creation of the angular project.
- For the installation, type this command: – – Right after that, let’s import that type definition inside the tsconfig.app.json file.
- Empty files won’t do the trick, so let’s add some code to the Home component: – – In here we import OnInit interface which defines function ngOnInit.
- In the end, we are going to include our component into the app.module.ts file: – – Angular Cli provides a better and easier way to instantiate components, all you need to do is to type the command: – – Angular CLI will create all of this for you.
Part 7 is focused on creating the Angular project and Angular components as well as explaining how things work while starting the project. In this complete series, you will learn how to develop web app by using .NET Core 2.0, Angular 4, and MySQL. Also, we will post the app on Windows and Linux environment.
@dotnetkicks: .NET Core 2.0 with Angular 4 and MySQL – Part 7 Angular components by @VladaPecanac #dotnet via @DotNetKicks
Creating the server part (.NET Core web API part) is just a half of the job we want to accomplish. From this point onwards, we are going to dive into the client side of the application to consume the web API part and show the results to the user by using angular components and many other features.
If you want to see all the basic instructions and complete navigation for this series, check out the following link: Introduction page for this tutorial.
For the previous part check out: Part 6 – Creating .NET Core WebApi project – Handling the POST, PUT, and DELETE requests
The source code is available at GitHub .NET Core, Angular 4 and MySQL. Part 7 – Source Code
This post is divided into several sections:
Installation of the Angular CLI and starting a new project
First, we are going to install the Angular CLI (Angular Command Line Interface) which will help us a lot with the creation of the angular project. To install Angular CLI, type the following command at the command prompt:
If you already have Angular CLI installed, verify that you have the latest version. If not, please update it before starting the project. You can find all the instructions in here: https://github.com/angular/angular-cli.
After the installation completes, we are going to create a new project.
Open the Visual Studio Code and in a terminal window (CTRL+~) navigate to the path you want your…