dotnet new command to use templates to generate angular apps

Source: Internet
Author: User
Tags dotnet

The dotnet new command uses template fast-growing as a single-page application, this article takes angular application as an example.

The most recent version of the. NET Core SDK RC4 has been updated with the dotnet new command.

dotnet New does not create a console app by default, but displays help, and displays different help based on the current directory content.

First make sure that the. NET Core SDK RC4 is installed successfully.

Dotnet--version

The output is as follows:

1.0.0-rc4-004771

Create a console project and run it with the following command:

dotnet New Console

dotnet Restore

Dotnet Run

dotnet New command details:

dotnet New Command Installation template

Install a single-page app spa template

dotnet New--install Microsoft.AspNetCore.SpaTemplates::*

* Indicates getting the latest version of the template, which is obtained from NuGet.

Install and then execute the dotnet new command, as follows:

Will find a few more templates.

The following uses dotnet new angular to quickly create a angular project.

Then execute the project with the following effect:

The entire command is as follows:

dotnet New Angular

dotnet Restore

Dotnet Run

There are also react kncokout and other templates, not too much to introduce here.

If you want to do the corresponding development, you need to install the corresponding JS package, using NPM Install, Nodejs need version 6 or more.

Reference Document: 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, please click " recommend ", thank you.

dotnet new command to use templates to generate angular apps

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.