AngularJS is developed and maintained by Google and community or individual developers and organizations.
In this article, I will discuss how to set up AngularJS in Ubuntu.
You should have access to a user account with superuser privileges.
Installing Angular in Ubuntu
You can following the given steps to install Angunalr on your Ubuntu system.
There are various ways to install NodeJS on Ubuntu. We will use NVM or Node Version Manager to install Node.js on Ubuntu. This allows you to install and maintain different versions of Node.js and associated packages.
First, install NVM by using the given command –
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
Restart your shell or use the following command to source the file –
You can check the available NodeJS versions by using –
nvm list-remote | more
We will install the latest LTS release of NodeJS –
nvm install 14.17.6
Once installation is completed you can verify the installation by using –
Installing Angular CLI
After the installation of NodeJs, install the Angular/cli in your Ubuntu system by using –
npm install -g @angular/cli
Once Angular/cli gets installed you can verify it by using –
This will display output as given in the image below.
Create and run an Angular application
Create a new Angular application by using the ng new command in your terminal.
ng new hello-angular
This will create a new directory named hello-angular and create required files and include libraries in this folder and make the angular project ready to execute.
Once the project is created move to the project directory –
Use the following command to run this application –
ng serve -o
You will see the output in your default browser as given in the image below.
This will open at URL
For more information on language usage, you can read AngularJS Documentation.
I hope you have successfully set up AngularJS on your Ubuntu system. Now if you have a query then write us in the comments below.