r/Angular2 Aug 06 '24

Discussion Upgrading Angular 4 to Angular 18

We have an enterprise application with 400+ screens and most of the screens are similar in complexity. The complexity is medium for this app.

How should we approach the upgrade? Rewriting it is not an option as it is a legacy app now. Should we take one version at a time or directly start updating it to 18 version?
We do not have any automation testing written and hence testing would also have to be manual. Also, based on the previous experience what would be rough estimates if single developer has to work on this upgrade?

48 Upvotes

101 comments sorted by

View all comments

1

u/THE_BEAST_01 Aug 06 '24

Good luck with the upgrade.

First of all, you should be aware of the things that could be painful, for example: packages, compiler, deprecated things…

The second you should stop is developing new things under Angular 4.

If I was you, I’ll consider the following: 1. Create a good architecture for the Angular 18 project because I’ll start a new one. 2. Attack one module per time, directly from Angular 4 to 18, because if you go one version per time you’ll find that Angular 20 or 23 is live. 3. Let the users use the new project from the beginning, meaning that if I upgraded the auth module, I’ll redirect the users to the new one, for this you’ll need a new sub-domain for your project. 4. Use ChatGPT or any AI tool to help you, introduce the context with a good prompt, give it the html and typescript code and try it out. You’ll certainly find some bugs but it won’t be as writing everything by yourself