Post

How to create first angular project using Command Line Interface ?

Steps Involved are:

  • Download and install node js. Node provides some tools to build Angular projects.
  • Use NPM to install Angular CLI. Refer to Install Angular CLI.
  • Command to create a new project in Angular:

ng new hello-world

Below are the screenshots of the project creation process:

create-angular-project-step1 create-angular-project-step2 create-angular-project-step3 create-angular-project-step4

  • During setting up the project, it will ask for enabling Angular routing. Enter “yes” and continue.
  • Also, choose the stylesheet format for the project.
  • After the project creation is successful, it will try to integrate Git with the email present in the system. If it cannot find a proper Git-configured email, it will ask you to enter the name and email ID to integrate with Git. If you are not using Git, you can ignore this step.
  • Finally, to run the project, type the following command:

ng serve

The default port for Angular is 4200. The project will be running at [http://localhost:4200/]http://localhost:4200/ after compiling.

Enjoy this blog? Buy Me A Coffee 💖 Sponsor on GitHub
This post is licensed under CC BY 4.0 by the author.

Comments powered by Disqus.