Hello,
as you know Angular is an app-design framework and development platform for creating efficient and sophisticated single-page apps, and it's a free JavaScript framework and open source developed by Google.
This tutorial will help you to install the latest version of Angular CLI tool on Ubuntu 19.10, 18.04 & 16.04 Linux operating systems.
To install Angular on your computer you need to follow the next steps.
- Install NodeJS
Node.js is a JavaScript runtime built on Chrome’s V8 JavaScript engine. Node.js can be installed in multiple ways on your Ubuntu Linux machine. You can use Ubuntu’s official repository to install Node.js or another way to use NodeSource repository. Installation via NodeSource repository will allow you to choose latest version of Node.js.
First of all open your terminal or press Ctrl + Alt + T :
sudo apt install nodejs
node -v
npm -v
Note: It is recommended to install Node Package Manager(NPM) with Node.js. NPM is an open source library of Node.js packages
Note: It is recommended to install Node Package Manager(NPM) with Node.js. NPM is an open source library of Node.js packages
if you want to install the latest version of node and npm you can run the next commands in your terminal.
sudo npm install -g n
Then run this command
sudo n latest
- Install Angular/CLI
to install Angular CLI (Command Line Interface) you need just to run this command in your terminal :
sudo npm install -g @angular/cli
with this command the latest version of Angular CLI will be installed on your Ubuntu Linux system.
with this command the latest version of Angular CLI will be installed on your Ubuntu Linux system.
Angular CLI provides a command ng used for command-line operations. Let’s check the installed version of ng on your system by using the command :
ng --version
Now we have successfully installed Angular9. So we can start creating and developing Angular Applications.
Now we have successfully installed Angular9. So we can start creating and developing Angular Applications.
- Create new Angular Application
After the installation of Angular CLI we can create a new angular application by Executing the commands :
ng new
for example i will create a project with the name "hello-world", and i will do it with this command :
ng new hello-world
This will create a directory named hello-world in your current directory, and create an Angular9 application.
This will create a directory named hello-world in your current directory, and create an Angular9 application.
- Start the Angular application
You can access your angular application on localhost port 4200, Which is the default host and port used by Angular application.
localhost:4200
Merci pour l'article
ReplyDeleteMerci beaucoup pour le tuto
ReplyDeleteParfait !
ReplyDelete