Wednesday, July 18, 2018

Installation and Project Setup - Angular 6

2 comments

This is my first post on Angular 6 . In this post, we will install all the required tools and then  see how to create a sample Angular 6 project using npm and Angular CLI .

 Step 1 : Download and Install NodeJS

Why do we need NodeJs to build angular apps ? 
 Angular (Angular 2) is completely different from AngularJS and you will be using Typescript to build your apps . Our browsers do not understand typescript and so we have to transpile our typescript to javascript and for that we will need NodeJs . Also there are other steps like minification , optimization , bundling etc  which make your app more efficient and these are available in  NodeJs . The npm (node package manager) helps manage different dependencies in your angular project .

Once NodeJS  installation is complete now we have to install the angular CLI  - Angular Command Line Interface . Angular-CLI provides with boilerplate code for your Angular project and eases your development process . For more details on the Angular CLI refer the wiki page .


Step 2 :  download and install the Angular CLI

run the below command from your terminal :

npm install -g @angular/cli

Step 3 : Create a new project using the Angular CLI and “ng new” command.

This will create a new folder and all the necessary files and project dependencies for our angular app. We need these dependencies for steps like optimization as mentioned before.

            ng new <project-name>

Step 4 : Bring up the server using the ng serve command . This will build the application and start a web server .

cd <project-name>
ng serve

Navigate to http://localhost:4200/ to verify that the server is up and running.

Step 5 : Download and install an IDE or code editor like Visual Studio Code to start editing and testing your app .


Open your project created in step3 in the IDE and you can see a bunch of configuration files and dependencies added to your project . 



2 comments :


  1. Nice to see this BLOG..keep updating for infromation We offers students hands-on opportunity to implement their knowledge gained in the real time projects & gain valuable experience that will make them a more eligible candidate for jobs.Digital Lync offers one of the best Full Stack training in Hyderabad with a comprehensive course curriculum with Continuous Integration, Delivery, and Testing.
    software training and placement institutes in hyderabad
    best training and placement institutes in hyderabad
    web development courses
    full stack developer course

    ReplyDelete