Angular CLI Installation

On the last tutorial article, we discussed how to install NodeJS and Node Package Manager (NPM). This time, we will talk about Angular CLI Installation.

CLI means “Command Line Interface”. It is a tool that automates the code setup for your applications, from creating your configuration files to generation of different components for your application.

To get started with your Angular CLI installation, go to www.github.com/angular/angular-cli

angular cli installation

Note that the Angular CLI installation also requires updated NodeJS and NPM versions. If you haven’t done it yet, refer to the tutorial on installation of NodeJS and NPM.

In your terminal, type “npm install -g angular-cli”

angular cli installation

Once it’s done loading, check if the installation is successful by typing “ng version”.

angular cli installation

Once Angular CLI installation is successful, you may now use Angular CLI to create a saved project or archetype, and for automated generations of different components such as Directives, Services or even Routers for your application.

Angular CLI is still in the development stage. In other words, Beta version. From time to time, you may need to update your Angular CLI version. To do that just follow these commands:

angular cli installation

To create a new Angular project using Angular-CLI, type this on your terminal:

angular cli installation

  • This will automatically generate your source files and configuration files
  • It will also create the src folder containing your initial Angular components and HTML files.
  • End-to-end folder or e2e folder is also created

angular cli installation

And it’s ready to be run. Just clear your terminal and type “ng serve”

angular cli installation

As you can see, it is running on port “localhost:4200”. Go to your browser and type it in the address bar and you’re done.

angular cli installation

Angular CLI installation is quite easy, right? On the next article, we will discuss how to choose your preferred IDE.

Subscribe Now and Upgrade Your Skills Today!
Sign up now and have the latest tech tutorials delivered straight to your mailbox.

PLUS: Get exclusive member-only discounts (up to 80% OFF!!) on our top tech courses in Udemy!
We hate spam. Your email address will not be sold or shared with anyone else.