Angular is a JavaScript open-source framework that helps in developing single-page web applications suitable for web/mobile/desktop. Angular combines declarative templates, dependency injection, end-to-end tooling, and integrated best practices to solve development challenges. Angular empowers developers to build applications that live on the web, mobile, or desktop.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our perform related Angular queries.
In this context, we shall look into how to install Angular on Ubuntu 20.04 LTS.
1. Perform System Update
First, make sure that all your system packages are up-to-date by running the following apt commands in the terminal:
$ sudo apt update
$ sudo apt upgrade
2. Install Node.js
Install Node.js and npm from Node Source. You simply need to add the PPA for the version you want to install:
$ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
To install, run the commands below:
$ sudo apt install nodejs
Next, update the npm version to the latest version by running the following command:
$ npm install npm@latest -g
Once done, verify the installation by running:
$ node --version
$ npm --version
3. Install Angular on the system
Run the following commands to install the Angular CLI tool on your system:
$ npm install -g @angular/cli
Once installed, verify the installed version of Angular using the following command:
$ ng --version
4. Create a new Angular Application
Now that we have Angular installed we can create a basic scaffolding for a new application. We will use our newly installed Angular CLI to accomplish this:
$ ng new linuxapt
First, change into the newly created directory for our application:
$ cd linuxapt
$ ng serve --host your-server-ip --port 8088
Angular project is deployed and listening on port 8088. You can access it using the URL http://your-server-ip-address:8088.
This article covers the process of installing Angular in Ubuntu 20.04 LTS Focal Fossa system. In fact, Angular is an open-source web application framework for building mobile and desktop web applications. It comes with an Angular CLI utility that helps you to create, manage, build and test Angular applications.