Angular CLI makes it easy to start with any Angular project. Angular CLI comes with commands that help us create and start on our project very fast. Let us now go through the commands available to create a project, a component and services, change the port, etc.

To work with Angular CLI, we need to have it installed on our system. Let us use the following command for the same −

To create a new project, we can run the following command in the command line and the project will be created.

ng serve // will compile and you can see the output of your project in the browser −

4200 is the default port used when a new project is created. You can change the port with the following command −

npm install -g@angular/cli

ng new your Project

cd your Project

ng serve 

http://localhost:4200/

ng serve --host 0.0.0.0 --port 4201

©2020 Angular-cli.com