Angular Migration Of Old Projects (Projects with Version <NG9) To Latest Version- Challenges

asaralaya

Abhishek P N

Posted on January 30, 2023

Angular Migration Of Old Projects (Projects with Version <NG9) To Latest Version- Challenges

Background

Angular is a TypeScript-based free and open-source web application framework led by Google. It was a complete rewrite of AngularJS and it is a component-based framework for building scalable web apps. It has a collection of well-integrated libraries and features such as client-server communication, routing, and more.

Since Angular is very much flexible in terms of scalability for enterprise grade applications, many enterprises adopted this framework to develop their web-application when this framework was released

Angular team provides updates to this framework frequently to add features, provide security fixes and resolve bugs. Angular team provides support of 18 months to all major releases including 12 months of LTS

Since the intervals between the updates is relatively small, it is necessary for the enterprises to cope-up with the updates to have the latest security patch available.

But unfortunately many enterprises failed to get updated with the latest release of the framework and they are doing the upgradation for many versions at once
Eg- NG 7-NG14

Problems

  • In subsequent updates of angular from NG2, many changes were introduced. But the major one being the IVY compilation that was introduced in NG9 and made mandatory in NG12.

  • NG12 wont support View Engine compilation as prior versions of Angular did.

  • This change is a major change since the enterprises which adopted Angular and failed to update to subsequent versions that were released frequently, got stuck with version <NG9.

  • When they were mandated to have latest version of the framework available, there were many braking changes since all the dependencies used in the application were also needed to be compiled using IVY (ie Dependencies also needed to be updated to NG>9

  • Strict type and template checking in new versions introduced many errors in the application when tried to upgrade

Conclusion

  • Try to follow the best code practices

  • Update the projects and dependencies with the latest Angular versions available as soon as released

  • Enable Ivy compilation in NG9 while updating and resolve the errors then and there

So be up-to-date with the Angular versions released to get the latest security updates and features released

💖 💪 🙅 🚩
asaralaya
Abhishek P N

Posted on January 30, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related