Angular js vs angular 2

Angular js vs angular 2

Angular js was introduced in 2009 as framework to develop single page applications, popularly known as SPA’s. From here it has come a long way and has become an integral part and is widely used in today’s web applications.

Angular 2 was introduced in 2014. Angular 2 is different from angular js in a variety of advanced features and the way things are handled.

Let’s take a look:

  1. The prime building blocks of angular js were controllers and $scope objects. These are dropped in angular 2. These are replaced with components and directives in angular 2. It makes use of zone.js to detect changes.
  2. Angular 2 was developed keeping in mind mobile application where you need performance improvement. This implies that angular 2 is better in performance than angular js
  3. A lot of modules have been removed in angular 2 which makes it lightweight.
  4. Angular 2 has little backward compatibility so migration from angular js to angular 2 will be a big job
  5. Angular 2 is based on ES6 model. So it is more flexible and can take advantage to the wide range of features offered by ES6.
  6. Angular 2 has child routing feature which wasn’t present in angular js. The whole application can be divided into mini applications each mini application having its own routing feature.
  7. Angular 2 also has a logging feature which helps in performance analysis and improving performance.
  8. Angular 1.x controllers are replaced with components in angular 2
Comments are closed.