angular-cli Getting started with angular-cli

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!


This section provides an overview of what angular-cli is, and why a developer might want to use it.

It should also mention any large subjects within angular-cli, and link out to the related topics. Since the Documentation for angular-cli is new, you may need to create initial versions of those related topics.

Angular CLI - The Basic Steps

  1. You will need to install node.js -
  2. npm install -g @angular/cli - install the CLI by executing this command in the terminal
  3. ng new projectname - after executing this command in the terminal, you will create a new sub folder titled projectname in your current folder.
  4. cd projectname - go to the sub folder, where your project is
  5. ng serve - run the project. It will be available at http://localhost:4200

Generating and serving an Angular project via a development server

To create a new project ng new [project-name] which initializes git.Install packages for tooling via npm. It creates the project successfully.

cd [project-name] and execute either npm start or ng serve

It'll run the server in the given default port.

Application will refresh according to the changes made in the directory. The default HTTP port and the one used by the LiveReload server can be changed using below command

ng serve --host --port 4201 --live-reload-port 49153

Installation or Setup

Note: Angular CLI versions are under rapid development. This documentation targets for the latest version.


To execute and work with the latest version, Angular CLI and the project have dependencies that require node v6.9.0 or higher.


Make sure that a node version is installed which is compatible with the CLI

Install the Angular CLI globally. It installs the latest version.

npm i @angular/cli -g or yarn global add @angular/cli , depending on the package manager in use.

ng help command will provide the executable commands

Got any angular-cli Question?