32.3 C
Senior Writer and partner

How to install Angular on Ubuntu 20.04 / Debian 10?

In this post, I will show you how to install Angular on Ubuntu 20.04 / Debian 10.

Angular: a command-line interface for Angular

Angular is a Javascript framework for creating the front end side using the MVC pattern. It was created in 2009 by Google and is becoming more and more popular. Thanks to Angular we will be able to speed up the work from the front end using a lot of Javascript functionalities perfectly organized. Its methodology is the SPA, i.e. single page application.

On the other hand, Angular is being widely used in a new stack called MEAN (MongoDB, ExpressJS, Angular and NodeJS) where you can create other types of web applications.

In order to have a tool to manage Angular better, it is that AngularCLI arises. Angular is a command-line interface for Angular, with it, we can create an application that already works, right out of the box.

- Advertisement -

So, if you use Angular or you want to learn about it, you have to install Angular.

Install Angular on Ubuntu 20.04 / Debian 10

AngularCLI requires for its operation that the system has NodeJS installed. So the first step is to install it. I recommend you to read our post about it:

How to install NodeJS on Debian 10?

How to install NodeJS on Ubuntu 20.04?

After it is correctly installed, we can install it using npm. So, you have to install it too.

:~$ sudo apt install npm

To do so, just use the following command:

:~$ sudo npm install -g @angular/cli
1.- Install Angular on Ubuntu 20.04 / Debian 10
1.- Install Angular on Ubuntu 20.04 / Debian 10

Then, create a new project using this tool:

:~$ ng new example-project

Now, you have to choose the slytesheet format.

This will create a new folder called example-project. Of course, you can change the name of the project. Access it and serve the project.

:~$ cd example-project 
:~$ ng serve 

This will make the application available at http://localhost:4200. Remember that this port has to be available in the firewall.

However, we can change those parameters and specify a port and a host.

:~$ ng serve --host [host_ip] --port [port]
2.- Running an Angular Aplication
2.- Running an Angular Application

When you open the browser and access your project, you will see the following:

3.- Project running
3.- Project running

So, Angular is ready to be used.


Developers need tools to help speed up projects. Well, with Angular we will have a terminal interface to manage this fantastic framework.

Please share this post and join our Telegram channel.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
"The best Linux newsletter on the web"


Please enter your comment!
Please enter your name here

Latest article