Angular is open-source web application frameworks. It keeps track of all the components and checks regularly for their updates.
This tutorial will help you to install Angular on Fedora 35/34/33 Linux systems. Also, this will help you to create a sample Angular application.
Step 1 – Installing Node.js
First of all, you need to install node.js on your Fedora system. Use the following set of commands to add node.js PPA in your Fedora system and install required packages.
curl -sL https://rpm.nodesource.com/setup_14.x | sudo -E bash -
sudo yum install nodejs
Make sure you have successfully installed node.js and NPM on your system
Step 2 – Install Angular on Fedora
After finishing the Node.js installation on your system. Use the following commands to install the Angular CLI module using the npm on your system.
npm install -g @angular/cli
jThis will install the latest available Angular CLI version on your system. To install specific Angular version run command as following with version number.
npm install -g @angular/[email protected]6
## Install Angular 6
npm install -g @angular/[email protected]7
## Install Angular 7
npm install -g @angular/[email protected]8
## Install Angular 8
npm install -g @angular/[email protected]9
## Install Angular 9
Use of the -g option in the above command will install the Angular CLI globally. It will be available to all users and applications on the system.
The Angular CLI provides a command
ng used for command-line operations. Once the installation is finished, Use the ng command to check the installed version.
Output/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _| / △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | | / ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | | /_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___| |___/ Angular CLI: 9.1.4 Node: 14.2.0 OS: linux x64 Angular: ... Ivy Workspace: Package Version ------------------------------------------------------ @angular-devkit/architect 0.901.4 @angular-devkit/core 9.1.4 @angular-devkit/schematics 9.1.4 @schematics/angular 9.1.4 @schematics/update 0.901.4 rxjs 6.5.4
Step 3 – Create New Angular Application
Now, create a new application named hello-angular using the Angular CLI tools. Execute the commands to do this:
ng new hello-angular
Output... ... added 1011 packages from 1041 contributors and audited 19005 packages in 36.281s found 0 vulnerabilities Successfully initialized git.
This will create a directory named “hello-angular” in your current directory, and create the application.
Step 4 – Serve Angular Application
The default Angular application is ready to serve. Change to directory hello-angular and run your Angular application using the ng serve command.
You can access your angular application on localhost port 4200, Which is the default host and port used by the Angular application.
It also allows to change host and port for running Angular application using –host and –port command line arguments.
ng serve --host 0.0.0.0 --port 8080
With the use of host 0.0.0.0 listens on all interfaces. So you can access it from a private network or public network.
For the production applications, Use this tutorial to configure Apache as front-end proxy server for Angular application. So it will be accessible to end users on default port.
This tutorial helped you to install the Angular CLI utility on a Fedora Linux system. Additionally provides you instructions to create a sample Angular application and run it.