Friday, 20 January 2017

How to setup Angular2 Windows Local Machine

1 comment

Topics of Article:

1.Downloading npm and node.
2.creating new project in angular2
3.Installing dependencies for Angular2
4.Running Small application.

Angular 2 is the new Java script framework released by the Tech gaint Google after Angular js.There are some differences between Angular 1 and Angular2 versions.In Angular 2 google introduced a Component based development.I will discuss about those in other article now in this article i am going to explain about Angular 2 Setup in Local windows machine.

Now you can ask me a question We have more online quick start live coding Environments for Angular 2 why should i need to setup it on local.But it is not the place to develop real applications.You should develop in local and to develop you should learn.
Note: Example for live coding here..

Steps to Setup Angular2



Step1:
1.Download and install node and npm from here if you not installed yet.
2.Download node.js official site https://nodejs.org/en/download/.

Note: Node.js and npm are essential to modern web development with Angular and other platforms. Node powers client development and build tools. The npm package manager, itself a node application, installs JavaScript libraries.
3.After installing node.js on your system you can check it using command prompt using below command.
node -v
Here in my system i have the latest version 6.8.3 of node.

Updating npm:
Node comes with npm installed so you should have a version of npm. However, npm gets updated more frequently than Node does, so you'll want to make sure it's the latest version.
Note: Version should be higher than 2.1.8 to support  latest libraries installation.
npm install npm@latest -g
It updates npm to latest version.

Step 2:
1.Create a folder for angular project where ever you want in your machine.Ex:Angular2quickstart-master.
2.Download Angular2 QuickStartSeed into your project folder from here.
3.open your command prompt and navigate to your project folder for ex: Angular2quickstart-master i created.
Step 3:
1.Type Install npm command to install all node dependencies.

2.The dependency packages installed like below.



3.Type npm start and press enter to run the angular2 example in browser.
Step 4:
1.Then browser automatically opens it will shows welcome message like below.

Conclusion

In future articles i will explain how to setup angular2 in Visual studio also.To know more angular2 please subscribe to this blog subscribe. OR follow on Social networks for daily awesome updates[Facebook,twitter,google plus].

1 comment: