Angular 2 Applications

Angular 2 is the new improved version of the ever popular JavaScript framework AngularJS. Angular 2 is a re-imagining of Angular applying all lessons learned from v1.x and promotes a component based architecture while leveraging new features of ES2015 (or TypeScript) like classes and modules.

AngularJS 2.0 was announced at the ng-Europe conference 22-23. September 2014. The drastic changes in the 2.0 version created considerable controversy among developers. On April 30, 2015, the AngularJS developers announced that Angular 2 moved from Alpha to Developer Preview. AngularJS 2 can be downloaded from the official website. Angular 2 moved to Beta in December 2015, and the first release candidate was published in May 2016.Angular 2 is not a version upgrade, but a complete rewrite. The primary differences in Angular 2 over Angular 1 are:

Mobile development - desktop development is much easier when mobile performance issues are handled first

Modularity - much core functionality has moved to modules, producing a lighter, faster core

Modern browsers only - reducing the need for browser compatibility workarounds

Angular 2 recommends the use of Microsoft's TypeScript language

From Angular 1 to Angular 2

New and more explicit way to bootstrap an app in Angular 2. Now we use a bootstraper from angular2/platform/browser (platform specific) and point it to the root component of the application (f.i. bootstrap(MainComponent)) instead of Angular 1 ng-app.

Components in Angular 2 are like a directive with a template, an isolated scope and a controller.

data binding

interpolation just like in Angular 1 but removing vm (from to).

one-way data binding in Angular 1 ng-bind in Angular 2 is called property binding and denoted inside [] (f.i. ).