Angular 6 Installation And Setup
#Angular

Angular 6 Installation And Setup

Prerequisite to install and setup Angular 6 on Windows systems.

Nodejs
Npm
Angular CLI
IDE for writing your code

It’s required for Angular 6 that Nodejs should have version greater than 8.11 and npm has to be greater than 5.6.

Nodejs

No alt text provided for this image

Identify the nodejs is installed on your system with typing command node -v in the cmd prompt. This will help you see the version of nodejs currently installed on your system.


If it does not print anything, install nodejs on your system. To install nodejs, go the homepage https://nodejs.org/en/download/ of nodejs and install the package based on your OS. Official site’s homepage of nodejs will look like the following –

No alt text provided for this image
No alt text provided for this image

To install node on Windows 10, I downloaded node-v10.15.3-x64.msi from nodejs.org site. Run this msi file and follow the required step to install.




No alt text provided for this image

Once nodejs is installed, npm will also get installed along with it. To check if npm is installed or not, type npm -v in the terminal. It should display the version of the npm.


Once node and npm is installed then run below command on same window to install the CLI using the npm package manager.

npm install -g @angular/cli

No alt text provided for this image

After successfully installation of CLI you can create angular app in your system with the help of below command. Also to open and work on angular app code, download Visual Studio Code from https://code.visualstudio.com/docs/?dv=win64user


Create a new Project in Angular : To create a new project in angular use below command. After running this command required module will be added to this app and you can start basic work on the same application.

No alt text provided for this image


Ng new AngularTest

Once you run above command in Nodejs window then few option will be displayed in same window regarding routing and CSS frameworks etc. Please select Y for routing and select CSS/SAAS as per your requirement.

No alt text provided for this image

Once new project is created then below cmd screen will be displayed. This project includes relevant modules including htmls, css, type scripts etc. 


No alt text provided for this image
No alt text provided for this image

After this please check the physical location of your project. There you find source code including required module as below.


No alt text provided for this image

Now open this project in Visual Studio Code. Here you find complete structure of your project in explorer view.










Sharing few basic command to compile, build, run the project from Visual Studio code terminal or Nodejs command prompt.

ng build : this command build the project

No alt text provided for this image

ng serve :  run command ng serve to see the page in web browser.

No alt text provided for this image



In this article I explained the setup and configuration of Angular 6. In my next article I will try to help out on few more codding stuff on Angular.


Happy Learning!!! 









To view or add a comment, sign in

More articles by Sharjeel Bilali

Others also viewed

Explore content categories