Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
ASP.NET Core 5 and Angular

You're reading from   ASP.NET Core 5 and Angular Full-stack web development with .NET 5 and Angular 11

Arrow left icon
Product type Paperback
Published in Jan 2021
Publisher Packt
ISBN-13 9781800560338
Length 746 pages
Edition 4th Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Valerio De Sanctis Valerio De Sanctis
Author Profile Icon Valerio De Sanctis
Valerio De Sanctis
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Getting Ready 2. Looking Around FREE CHAPTER 3. Front-End and Back-End Interactions 4. Data Model with Entity Framework Core 5. Fetching and Displaying Data 6. Forms and Data Validation 7. Code Tweaks and Data Services 8. Back-End and Front-End Debugging 9. ASP.NET Core and Angular Unit Testing 10. Authentication and Authorization 11. Progressive Web Apps 12. Windows, Linux, and Azure Deployment 13. Other Books You May Enjoy
14. Index

Solution overview

The first thing that catches the eye is that, as we've already mentioned, the layout of a standard ASP.NET Core solution is quite different from what it used to be in ASP.NET 4 and earlier versions. However, provided that we already have some ASP.NET MVC experience, we should be able to distinguish the ASP.NET back-end part from the Angular front-end part, and also figure out how these two aspects can interact.

The ASP.NET back-end stack is contained in the following folders:

  • The Dependencies virtual folder, which basically replaces the old References folder and contains all the internal, external, and third-party references required to build and run our project. All the references to the NuGet packages that we'll add to our project will also be put there.
  • The /Controllers/ folder, which has been shipped with any MVC-based ASP.NET application since the preceding release of the MVC framework.
  • The /Pages/ folder, which contains a single Razor Page—Error.cshtml—to handle runtime and/or server errors (more on that later on).
  • The root-level files—Program.cs, Startup.cs, and appsettings.json—which will determine our web application's configuration, including the modules and middlewares, compilation settings, and publishing rules; we'll address them all in a while.

As for the Angular front-end, it comprises the following folders:

  • The /wwwroot/ folder, which will contain the compiled, ready-to-publish contents of our application: HTML, JS, and CSS files, along with fonts, images, and everything else we want our users to have access to in terms of static files.
  • The /ClientApp/ root folder, which hosts the Angular (and package manager) configuration files, as well as a couple of important sub-folders of which we're about to give an overview.
  • The /ClientApp/src/ folder, which contains the Angular app source code files. If we look at them, we can see that they all have a .ts extension, which means we'll be using the TypeScript programming language (we'll say more about this in a bit).
  • The /ClientApp/e2e/ folder, containing some sample end-to-end (E2E) tests built with the Protractor testing framework.

Let's quickly review the most important parts of this structure.

You have been reading a chapter from
ASP.NET Core 5 and Angular - Fourth Edition
Published in: Jan 2021
Publisher: Packt
ISBN-13: 9781800560338
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime