The dotnet new command uses the template to generate an Angular application, dotnetangular

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.