The dotnet new command uses the template to generate an Angular application, dotnetangular
The dotnet new command uses a template to quickly generate a single-page application. This article takes Angular application as an example.
The latest version of. NET Core SDK RC4 is updated.Dotnet newCommand.
By default, dotnet new no longer creates console applications, but displays help, and displays different help information based on the content of the current directory.
First, ensure that the. NET Core SDK RC4 is successfully installed.
Dotnet -- version
The output is as follows:
1.0.0-rc4-004771
Create a console project and run the following command:
dotnet new console
dotnet restore
dotnet run
Dotnet newCommand details:
Dotnet new command Installation Template
Install SPA templates on a single page
dotnet new --install Microsoft.AspNetCore.SpaTemplates::*
* Indicates obtaining the latest template version, which is obtained from NuGet.
After installation, execute the dotnet new command, as shown below:
Some more Templates will be found.
UseDotnet new angularQuickly create an angular project.
Then execute the project. The effect is as follows:
The command is as follows:
dotnet new angular
dotnet restore
dotnet run
There are also templates such as react kncokout, which are not described here.
If you want to develop a js package, you need to install the corresponding js package and use npm install. nodejs requires version 6 or later.
Reference: https://blogs.msdn.microsoft.com/webdev/2017/02/14/building-single-page-applications-on-asp-net-core-with-javascriptservices/
If you think this article is helpful to you, click"Recommendation", Thank you.