Angular new project

Here are the steps to create a new Angular project:

Using the Angular CLI

  1. Install the Angular CLI globally by running the following command:

    npm install -g @angular/cli
  2. Create a new Angular project by running the following command:

    ng new my-app

    Replace my-app with the name of your project.

  3. Follow the prompts to choose the project template and configuration options.

Using the Angular CLI with a specific template

If you want to create a project with a specific template, you can use the following command:

ng new my-app --template [template-name]

Replace my-app with the name of your project and [template-name] with the name of the template you want to use (e.g. blank, routing, service-worker, etc.).

Using the Angular CLI with a specific configuration

If you want to create a project with a specific configuration, you can use the following command:

ng new my-app --configuration [configuration-name]

Replace my-app with the name of your project and [configuration-name] with the name of the configuration you want to use (e.g. es5, es6, es7, etc.).

Using the Angular CLI with a specific version

If you want to create a project with a specific version of Angular, you can use the following command:

ng new my-app --version [version]

Replace my-app with the name of your project and [version] with the version of Angular you want to use (e.g. 12.0.0, 11.2.14, etc.).

Using the Angular CLI with a specific package manager

If you want to create a project with a specific package manager, you can use the following command:

ng new my-app --package-manager [package-manager]

Replace my-app with the name of your project and [package-manager] with the name of the package manager you want to use (e.g. npm, yarn, etc.).

Once you've created your project, you can navigate to the project directory and start building your Angular application.

Here are some common commands you can use to get started: