Angular (9.x) & ASP.NET Core (3.1) App - daaren-urthling/tutorials GitHub Wiki
This tutorial show how to build a web application using ASP.NET Core (3.1) and Angular (9.x).
Everything is done with Visual Studio Code and from the command line, using the Angular and the .NET Core CLI.
Prerequisites
- Visual Studio Code
- Node.js
- .NET Core (3.1.3+)
- Angular (9.1.9+)
- "C# for Visual Studio Code" plugin (optional)
Create the project
Scaffold the ASP.NET Core project with the .NET CLI using the Angular project template:
dotnet new angular -o HelloApp
open the folder with VS Code:
code HelloApp
The template creates both the C# back-end and the Angular front-end. From the terminal window in VS Code run:
dotnet build
It both restores required packages for the Angular environment and nuget packages for the ASP.NET environment. By running:
dotnet run
the ASP.NET back-end and the Angular front-end will be started. The ASP.NET back-end is acting as a file server for the Angular pages and as a web server for the app itself.