In order to install the Angular CLI, you will need Nodejs. Make sure you install this with the default options and reload your command line or console after doing so. Check out my blog for Node.Js Installation on Windows.

The two prerequisites you need to check for are:

  • Node.js with NPM (Node Package Manager)
  • Angular-CLI (Command Line Interface)

Step 1:

  • Open command line and type
>npm install -g @angular/cli
  • Once complete, you can now access the CLI by simply starting any commands with ng.
  • Check Angular Version by typing
>ng version
  • and it will return

Step 2:

Hop into whichever folder you want to store your projects, and run the following command to install a new Angular 7 project.

>ng new ng7-pre

It’s going to present you with a couple questions before beginning:

? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? SCSS [ http://sass-lang.com ]

It will take a minute or two and once completed, you can now hop into the new project folder by typing:

>cd ng7

Step 3:

Open up this project in your preferred code editor (I use Visual Studio Code, and you can launch it automatically by typing code . in the current folder), and then run this command to run a development server using the Angular CLI.

>ng serve -o

It will open your default browser at http://localhost:4200

Conclusion

Now you’ve got Angular 7 project on Windows machine.

 

Thanks for reading!