Install the Angular framework on Linux

Initially called AngularJS, Angular is a framework for developing web pages taken over and developed by Google. It allows you to structure the code and adopt an architecture. Created in 2009 by Miško Hevery, it is one of the frameworks that have innovated in the front-end part.

The HTML5 standard finalized in October 2014 allowed the creation of independent and reusable graphic components called “Web components”. The Angular framework that was released in 2016 makes it possible to manipulate these Web components like React and others.

NodeJS and NPM from Github source code

NodeJS replaces languages such as PHP, JAVA, etc., traditionally used on the server side. It uses JavaScript to generate web pages. NPM allows you to install modules. This is the equivalent of the “Apt-get” on Linux.

We will install NodeJS in its latest version. You must ensure that you have all the dependencies required for its compilation before installing it. Update the indexes of your local “apt local manager” repository.

$ sudo apt update && sudo upgrade -y

Install the required dependencies for the repository.

$ sudo apt install make gcc g++ python wget 

Get the latest version of NodeJS using the wget command.

To know the latest version, click HERE.

$ wget https://github.com/nodejs/node/archive/v10.15.3.tar.gz 

We will extract the content.

$ tar zxvf v10.15.3.tar.gz 

Compile the application before you can install it.

$ cd node-10.15.3
$ ./configure 

Once the compilation is complete, install Nodejs.

$ sudo make install 

It is time to have a coffee because the operation will be more or less long depending on the power of your machine

node install : coffee break

Check the version of your NodeJS and NPM.

$ node -v
v10.15.2
$ npm -v
v6.4.1

Angular-cli

Angular-cli allows you to generate code for the implementation of a complete application. It uses the scaffolding concept to generate code quickly.

$ sudo npm install -g @angular/cli 

Install Angular

Create your new project.

$ ng new new-project 

Wait a few minutes for the installation to be completed

Enter in the directory.

$ cd new-project/ 

Check the version.

$ ng --version  

You are now ready to start

Launch your server.

$ ng serve 

Access your application from http://localhost:4200

angular new project from browser
signature Pierre-Christophe

No Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.