How to Create first Angular Project using Command Line Interface ?

Steps Involved are:-

  • Download and install node js. Node provider some tools to build Angular project.
  • Use NPM to install angular CLI. Refer here 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.






  • During setting up of project it will ask for enabling angular routing. enter yes and continue.
  • Also, choose the style sheet format for the project.
  • After the project creation is successful it will try to integrate git with the mail present in the system. if it cannot find a proper git configured email it will ask 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 below command
    ng serve
    The default port for angular is 4200.project will be running in URL http://localhost:4200/ after compiling.

What is Angular?

Angular is basically a framework for building client applications using HTML, CSS, Javascript, or Typescript.

Angular itself is written using Typescript. When compiling angular application transpiles to Javascript code. Transpiling is a process of converting the typescript code to javascript.

Need for Angular
When we build a complex application using Javascript, it is very difficult to structure, maintain, and test the application. To address these issues we use modern front end frameworks like Angular, React or Vue.js

Benefits

  • Helps to have a clean structure for application
  • Easy to Unit test
  • Reusable Code
  • Traditional javascript are difficult to manage.

The architecture of Angular Application
The angular application works in front only. Data storing is not the headache of angular. It is the back-end service that helps in data storing. Angular uses API(Application Programming Interface) to interact with backend.

First, you can install the typescript and then start setting up your first angular project
Install typescript
Setting up your first Angular Project

If you face any issue during the set up of your angular application, kindly drop in the comments section.