Prerequisites For Getting Starting With Angular 2
First and much need prerequisite is our INTEREST.
Apart from our interest the only thing required is bit knowledge about JavaScript. Angular 2 is typically typescript based JavaScript's framework so it's better if you have basic knowledge of JavaScript before learning angular2.
And if you don't know angular 1, it's alright you don't need to learn angular 1 for angular 2.
Let's follow the below table to get idea what skill is needed before we start Angular 2
Required Skill | Helpful Skill | Not Required Skill |
---|---|---|
Basic of JavaScript | OOP Concepts | Prior knowledge of Angular |
Basic of HTML, CSS | C++, C#, Java | Prior knowledge of Typescript |
Language Choice
We have four main choices for writing code in Angular 2. JavaScript (ES 5), JavaScript (ES 6), Typescript and Dart. But we will use Typescript, Because it is Strongly Typed language and it is easear to learn as it is a super set of JavaScript. Most developer prefer using Typescript for angular as angular itself is build on top of Typescript.
Type script is open source language developed by Microsoft. And like Babel, Typescript Compile code into ES5 standard so that it can run in all the browser.
We can understand different nature of language from the table given below.
ES5 | ES6/ES2015 | Typescript | Dart |
---|---|---|---|
No Compiles | Compiles | Compiles | Compiles |
No Types | No Types | Types | Types |
JavaScript | JavaScript | JavaScript | No JavaScript |
Code Editor
We can use any editor of our choice Like Sublime Text, Visual Studio Code, Coda, etc. But i prefer using Visual Studio Code developing Angular Application.
Node and NPM
If Node.js is not already on our machine, Install Node.js Version >= 5.0. We can get Node from following site https://nodejs.org/en.
NPM comes along with Node, so installing node will install Node and NPM at once.
Lets check the version of Node and NPM by entering commad node -v
and npm -v
in command prompt respectively.
Install angular-cli
angular-cli
is command line utility that facilates a quicker way for Project creation, generating Component, Pipes, Routes etc.
To install angular-cli enter in command prompt
npm -i -g angular-cli
once angular-cli is installed we can now use ng
command to create and run our angular application.