NodeJS

No we will not code in NodeJS :). But we need the NodeJS runtime. Secondly, this will also install npm (NodeJS package manager). NPM is used to install & manage our project dependencies. And also to install other tools that we need for angular2 development.

We will download and install node from the nodejs website.Note: We will need Node4 or above if you want to use Angular-cli.

To check node version: type the following command on a terminal window. (I recommend using Git Bash, it’s an amazing tool to have.)

JavaScript

1

node-v

node -v

To check npm version

JavaScript

1

npm-v

npm -v

Typescript

What is Typescript

TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.

Typescript gives you all the goodness of JS, with features like classes, interfaces and compile time check. Moreover, Angular2 is written in Typescript and most of the documentation follow Typescript. And once you start working with it, you will know the power it gives you and how easy it makes writing JS code. You can learn more about Typescript on the Typescript website.Note: Code written in Typescript has to be compiled to JS.

To install Typescript, type the following command on a terminal window (note sometimes you may have to prefix the command with ‘sudo’)

JavaScript

1

npm install-gtypescript

To check Typescript version: type the following command in the terminal window.

JavaScript

1

tsc-v

tsc -v

Angular-cli

What is Angular-cli

The Angular2 CLI makes it easy to create an application that already works, right out of the box. It already follows our best practices and the angular2 style guides! And with commands to create new components, service, interface … it makes working with angular2 more simpler and fun.

As of now, Angular-cli is still in beta but it is a very powerful tool that you should have while working with Angular2. It makes life very easy for us developers.

To install Angular-cli, type the following command in a terminal window (note sometimes you may have to prefix the command with ‘sudo’)

JavaScript

1

npm install-gangular-cli

To check angular-cli version: type the following command in the terminal window.

JavaScript

1

ng-v

ng -v

eslint

What is eslint

ESLint is an open source JavaScript linting utility.

Eslint will analyse your code and identify errors. Like, Is the code following a style guide? Eslint allows you to create your own rules, so to make sure you are following the same standards across your app. It’s very helpful when you have a big team.

Install eslint: type the following command in a terminal window (note sometimes you may have to prefix the command with ‘sudo’)

JavaScript

1

npm install-geslint

To check eslint version type the following command in the terminal window.

JavaScript

1

eslint-v

eslint -v

Visual Studio code

What is Visual Studio Code

Visual Studio Code is a code editor redefined and optimised for building and debugging modern web and cloud applications.

Visual Studio code editor is developed by Microsoft. It has amazing intellisense, which makes coding and debugging very easy. It also comes with inbuilt command line!