Why upgrade to Angular 2
  v2.0 Posted at 23/10/2017 4:58 PM by Anthony Nguyen

Do you know why it is a good idea to upgrade your AngularJS application to the latest version of Angular?

There are number of reasons why you should consider migrating your AngularJS application to the latest version, 

  1. Dynamism:
    The most annoying feature of AngularJS 1.x is that we can’t add anything dynamically. In contrast, in Angular 2 we can create a component, configure a router and register a service in a pleasant way. One of the basic concepts of Angular 2 is that after clicking on some menu item we can dynamically pull the part of the application responsible for the application display. To do it in Angular 1 we had to hack the framework, use undocumented functions and gaps in the framework – things that we actually shouldn’t do. 
  2. Component-based
    Angular 2 is entirely component-based. This feature enforces thinking in components and as a result, we get an application that is neatly and naturally divided into separate parts - at least if you don’t create one component for the entire subpage. Component-based application development is usually faster due to easy creation and reasoning. Well designed components are also reusable which makes an application code more coherent.
  3. Dependency injection
    There is a simpler, more intelligible dependency injection container in Angular 2. Few developers knew the difference between provider, service and factory in Angular 1 and there is no such problem in Angular 2. Now the default setting is class instance - only if you want to use a different raw value you need to declare it explicitly using an easily understandable object literal.
  4. TypeScript Support
    The latest version of Angular fully embraces Typescript. For those unfamiliar with this term, TypeScript Lang builds on top of what you already know about JavaScript but incorporates many additional tools to your ability to refactor code, write in modern JS (ECMAScript 2015), and compile to the older versions depending on browser request. Another important facet is IDE integration is that it makes easier to scale large projects through refactoring your whole code base at the same time. Its inbuilt code completion tool effectively saves your precious time from having to look up various features from the libraries you use individually.

Related rules

    Do you feel this rule needs an update?

    If you want to be notified when this rule is updated, please enter your email address:


    Note: Social Media login for Yotpo is not working in IE or Safari, please use Chrome. We are waiting for Yotpo to fix it.