Go back | Comparative Angular2 vs AngularJS

Comparative between AngularJS and Angular2

Introduction

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. The final version was released on September 14, 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, which introduces the following improvements:
· Class-based Object Oriented Programming
· Static Typing
· Generics
· Lambdas
- TypeScript is a superset of ECMAScript 6, and is backwards compatible with ECMAScript 5 (i.e.: JavaScript). Angular 2 also includes the benefits of ES6:
· Iterators
· For/Of loops
· Python-style generators
· Reflection
- Improved dependency injection – bindings make it possible for dependencies to be named
- Dynamic loading
- Asynchronous template compilation
- Simpler Routing
- Diary.js logging – measures where time is spent, to identify bottlenecks
- Replacing controllers and $scope with components and directives – a component is a directive with a template
- Reactive programming support using RxJS

· Comparative Trends between the past and the future of Angular (AngularJS vs Angular2) in the last five years:

· A World Map vision of the importance of AngularJS and Angular2 in the last five years:

Conclusions at October of 2016

- Angular2 began one year ago, but it's relevance doesn't arrive at 25% of AngularJS's relevance.
- Angular2 and AngularJS are mostly use in India.
- Angular2 only arrive in India, Canada, USA, Japan and Europe. The rest of the World doesn't know it.

Conclusions at April of 2017

- Angular2 began two years ago, and continues growing. Now arrive at 30% of AngularJS's revelance.
- Angular2 and AngularJS are mostly use in India.
- Angular2 is growing in Europe (Germany, France Poland and Spain).