Dotnet new angular

A popular choice!

dotnet new angular is a command that creates a new Angular project using the.NET CLI (Command-Line Interface).

Here's what happens when you run this command:

  1. The.NET CLI checks if you have the Angular CLI (Angular Command-Line Interface) installed. If not, it will prompt you to install it.
  2. Once the Angular CLI is installed, the.NET CLI creates a new Angular project with the default settings.
  3. The project is created in a new directory with the name MyAngularApp (or the name you specify if you provide a custom name).
  4. The project includes the basic files and folders needed for an Angular application, such as:
    • src: The source code directory, containing the Angular application code.
    • tsconfig.json: The TypeScript configuration file.
    • angular.json: The Angular configuration file.
    • package.json: The npm package configuration file.
  5. The project also includes some sample code to get you started, such as a basic component and a routing configuration.

Here's an example of what the project structure looks like:

MyAngularApp/
src/
app/
app.component.ts
app.component.html
app.component.css
app.module.ts
...
...
tsconfig.json
angular.json
package.json

To run the project, navigate to the project directory and execute the following command:

dotnet run

This will start the Angular development server, and you can access the application by navigating to http://localhost:5000 in your web browser.

Note that dotnet new angular is only available in.NET 5.0 and later versions. If you're using an earlier version of.NET, you can use the ng new command to create a new Angular project.