There are three steps to set up the development environment.
Install Node.js and npm from the following link
Verify your Node.js version. It should be Node.js version 8.x or greater and npm version 5.x or greater. Run the following command to check it.
Install the Angular CLI globally. Run the following command.
npm install -g @angular/cli
Create a new project
Open a terminal or cmd. Create a new project by running the following command.
ng new new-app
Serve the application
Now go into the project directory and run the server. Run the following command.
ng serve –open
ng serve command run the server and –open option will automatically open the browser on http://localhost:4200/