Angular CLI Installation and Setup

Posted By : Rakesh Roushan | 05-Sep-2019

Angular 2+ applications using the Angular CLI tool, CLI stands for "Command Line Interface". Angular CLI tool allows to install all dependencies, create a project, create class, create service, create component etc directly through the command line.

1. Install Node.js

First, an angular application requires node js(Node package manager) current/latest version so install node js to node js official website.
and flow this step.

     a). To get Node.js, go to nodejs.org.

                 sudo apt-get install nodejs

        b). To check your version, run node -v in a terminal/console window.

                  node -v

        c). Also, check the npm version

                  npm -v

Note:- If the latest version Node.js has not installed your system then not work angular-7 or latest version. so after installation check version of Node.

       d). If not installed latest version Node.js then update Node.js latest version
                    sudo npm install -g n  or
                    sudo npm install npm@latest -g

             e). and then
                   sudo n latest

2. Install Angular-7.3.8


Install the Angular CLI globally.

       a). To install the CLI using npm, open a terminal/console window and enter the following command:
                 sudo npm install -g @angular/cli
       b). check version of angular.
                ng --version   


3. Run the application.

The Angular CLI includes a server so that you can easily build and serve your app locally.

      a). Go to the workspace folder (my-app).
           b). cd applicationName
           c). Run project by using the CLI command ng serve, with the --open option.
                 ng serve --open
          The --open (or just -o) option automatically opens your browser to http://localhost:4200/.

 


4. Install Visual Studio Code.

You can then install VS Code using this command:


       a).  sudo snap install code --classic


5. Screenshot to view version Angular and Node js installations.
 

Conclusion

That's all for today, this is how we set up the angular CLI and Npm configuration for the in Angular 7. This is the best way to follow the instruction step by step.

Thank You.

About Author

Author Image
Rakesh Roushan

He has good knowledge about HTML5, CSS3, SCSS, Bootstrap, JavaScript, JQuery, Json, Typescript, Angular 2+, Angular Material, PrimeNG, and Stripe Payment Gateway. He is passionate about his work and loves his work.

Request for Proposal

Name is required

Comment is required

Sending message..