Site icon DataFlair

Install Angular – Angular Environment Setup Process

Free Angular course with real-time projects Start Now!!

Angular is a TypeScript based framework that works in synchronization with HTML, CSS, and JavaScript. To work with angular, domain knowledge of these 3 is required.

  1. Installing Node.js and npm
  2. Installing Angular CLI
  3. Creating workspace
  4. Deploying your First App

In this article, you will get to know about the Angular Environment setup process. After reading this article, you will be able to install, setup, create, and launch your own application in Angular. So let’s start!!!

Install Angular in Easy Steps

For Installing Angular on your Machine, there are 2 prerequisites:

Node.js

First you need to have Node.js installed as Angular require current, active LTS or maintenance LTS version of Node.js

Download and Install Node.js version suitable for your machine’s operating system.

Npm Package Manager

Angular, Angular CLI and Angular applications are dependent on npm packages. By installing Node.js, you have automatically installed the npm Package manager which will be the base for installing angular in your system. To check the presence of npm client and Angular version check of npm client, run this command:

npm -v

Installing Angular CLI

npm install -g @angular/cli

· After executing the command, Angular CLI will get installed within some time. You can check it using the following command

ng --version

Workspace Creation

Now as your Angular CLI is installed, you need to create a workspace to work upon your application. Methods for it are:

1. Using CLI

To create a workspace:

Ng new YourAppName

Running the Angular Application

For running the Application, go into the directory of the workspace you just created

cd DataFlair

ng serve –open

2. Using Visual Studio Code

Downloading Visual Studio

Firstly Downloading visual studio code:

Download and install the version according to your machine requirements.

In the terminal, navigate to the desired directory and to create new app type the following code :

ng new YourAppName

Press the Return/Enter key to set all the parameters to default.

cd YourApp
ng serve –open

Summary

Congratulations, finally you have successfully installed and created your first angular application. Using visual studio code is preferred over using CLI because in VS code, you have many extensions that increase your efficiency and make it easy to develop applications. Angular may take time to install because it fetches data from the internet and then creates the application. For each application created, you may require minimum storage of 200+ MBs. Once an application is created, it is very easy to modify and launch it using the GUI it offers.

Exit mobile version