ASP.Net Core SPA Application Command Line

ASP.NET Core is initialized from the Startup class in the application

wwwroot folderĀ contains static files (like js, css and image files for our web application).

project.json file. JavaScript object notation to store configuration information and it is this file that is really the heart of a .NET application.

 
<environment names=”Development”>
<link rel=”stylesheet” href=”~/view-resources/Areas/AppAreaName/Views/Users/Index.css” asp-append-version=”true” />
</environment>

<environment names=”Staging,Production”>
<link rel=”stylesheet” href=”~/view-resources/Areas/AppAreaName/Views/Users/Index.min.css” asp-append-version=”true” />
</environment>

Below are the commands to setup SPA in ASP.Net Core

COMMANDS:-

dotnet new –install Microsoft.AspNetCore.SpaTemplates::*

dotnet new angular

dotnet restore

npm install

start

  • npm i -g webpack
  • npm i webpack-compiler