How to Install Angular 7 on ubuntu using CLI? The quequest way
To get started with Angular, you need to install some dependencies on your machine. Those dependencies are…
- Node JS
- Angular CLI
Let’s learn how to install these dependencies one by one.
How to Install Node JS on Ubuntu?
One your terminal and use following commands one by one to install Node.Js and NPM together on your Computer.
$ sudo apt-get update
$ sudo apt-get upgrade
$ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash –
Now Node Js and NPM have completely installed on your machine. To confirm just write following command on your terminal.
It’ll show the installed version of Node and NPM on your terminal.
Node automatically installs the latest version of NPM.
After installation Node.JS, we need to install Angular CLI.
How to install Latest Version of Angular CLI on Ubuntu.
Use the following command to install the latest version of Angular CLI on Ubuntu.
$ npm install -g @angular/cli@latest
Angular CLI will be installed on your machine globally. To confirm write following command on your terminal and press enter.
$ ng -v
It’ll show the installed version of Node, NPM, and CLI on your machine. So, we have installed all those dependencies that we required to getting started with Angular. Now we are all set to install Angular 7 on Ubuntu.
How to install Angular 7 on Ubuntu?
To install Angular on Ubuntu, open your terminal and run following command and hit the enter key.
$ ng new yourProjectName
It’ll install Angular on your machine in a few minutes.
After installation go to your project folder and run following command
This command will start(serve) your project.
After that open your browser and type following URL in your browser.
The angular project will open in your browser with the following screen. You have successfully installed the Latest version of Angular on your machine.