Little about Angualr Js

A  widely popular and now a days a fundamental tool for building front-end applications. Since it’s inception in 2009, its been under constant change for better client side programming. If you are a front-end developer with little knowledge of Js, I reckon you give a try.

Installation

To install angular you need to install latest version Node.js with NPM (Node Package Manager) and Angular-CLI (Command Line Interface). I am dividing the whole installation process into steps to make sure everyone  understands the nitty-gritty of how it works:

Downloading and installing node and Angular CLI

Step 1  – Installing Node

Download the latest version of Node from the official website. https://nodejs.org/en/download/ . You can download 32-bit and 64-bit depending on your system requirements. Once you are done with installation you can check in the command line to make sure it is installed correctly. (A fast way to launch this in window is to press the Win + R keys on your keyboard. Then, type cmd or cmd.exe)

  • Type node -v (Tells you the installed version)
  • Type npm -v (Tells you the installed version)

Step- 2 – Installing Angular CLI

Once you are done with node installation then you have to install angular CLI.  Please type following command in your windows command line Install angular cli globally by using : –

  • npm install -g @angular/cli

Once installed you will see CLI package  installed. After that, you can check version of Angular CLI and to make sure it’s installed properly by using this command in command line.

  • ng –v

Bravo! You have installed the necessary environment for Angular production. Lets move forward.  Now you can create project in any directory. In order tell the command line in which drive its going to host the project, type the following:

  • Type f: (the drive name and press enter) then,
  • Type: cd angular (If you have angular folder in the F drive)
  • Type: ng new FirstApp

It will look something like this.

 

It will take some time to install all modules. Once you are done with project creation process, then you have to move into your project directory to run your project on browser.  

  • Type: cd ProjectDirectory (I created FirstApp project and I will type cd FirstApp )

It will see something like this. 

Now you are in your project directory. All you need to type the following commands to launch your application on browser 

  • Type: ng serve –open  (Open application into browser automatically)
  • Type: ng serve (You need to hit that URL into browser http://localhost:4200)

After typing any one of these commands you will see that your application is compiled successfully.  

You will see something like this.
 

 

 

  • Need a WordPress website for your business?

    Sure. Lets cut to the chase.