Installing Angular manually

This article demonstrates how to install the popular Angular framework from the command line on shared, reseller, and Turbo Web hosting accounts.

Angular is a popular web application framework and development platform for creating efficient and sophisticated single-page apps. Angular was formerly known as AngularJS.

This article demonstrates how to install Angular from the command line on shared, reseller, and Turbo Web hosting accounts.

Installing Angular

To install Angular on your account, follow these steps:

  1. Log in to your account using SSH.

  2. At the command prompt, type the following commands. Replace example.com with your own domain name:

    cloudlinux-selector create --json --interpreter nodejs --version 18 --app-root angdemo --domain example.com --app-uri angdemo
    cd ~/angdemo
    
  3. In your preferred text editor, create a file named package.json in the ~/angdemo directory. Copy the following text and then paste it into the package.json file:

    {
        "name": "angdemo",
        "version": "1.0.0",
        "description": "My Demo App",
        "main": "app.js",
        "scripts": {
          "test": "echo \"Error: no test specified\" && exit 1"
        },
        "author": "",
        "license": "ISC"
    }
    
  4. Save your changes to the package.json file.

  5. Type the following command. Replace username with your own account username:

    cloudlinux-selector install-modules --json --interpreter nodejs --user username --app-root angdemo
    
  6. To activate the virtual environment, type the following command. Replace username with your own account username:

    source /home/username/nodevenv/angdemo/18/bin/activate && cd /home/username/angdemo
    
  7. Angular uses the Git version control system to track project revisions. To configure Git, type the following commands. Replace [email protected] with your own email address, and Username with your own name:

    git config --global user.email "[email protected]"
    git config --global user.name "Username"
    
  8. To install Angular, type the following commands:

    npm config set strict-ssl false
    npm install -g @angular/cli
    
  9. You are now ready to use Angular. For example, to create a new Angular app named my-app, type the following command:

    ng new my-app
    

More Information

Related Articles