You use the Angular CLI to create projects, generate application and library code, and perform a variety of ongoing development tasks such as testing, bundling, and deployment. To install the Angular CLI, open a terminal window and run the following command: Run npm install -g @angular/cli
To create a new workspace and initial starter app: Run the CLI command ng new and provide the name my-app, as shown here: ng new my-app
The Angular CLI includes a server, for you to build and serve your app locally.
Navigate to the workspace folder, such as my-app.
Run the following command: cd my-app ng serve --open
It automatically opens your browser to http://localhost:4200