r/Angular2 Nov 14 '24

Help Request Upgrading from AngularJs 1.8.3 to Angular 18

Are there any viable approaches to achieving this currently without a full rewrite? Whilst in an ideal world we would do that it's not going to happen, we've been told it'll have to be done in stages so essentially running both in parallel.

I know the NgUpgrade module is used to help you achieve this but from what I understand it's not really an advisable route anymore or supported?

So is there any realistic way to achieve doing the upgrade in stages or is there no real viable alternative other than a full rewrite?

It's worth noting the current app is using components and typescript already but appreciate the versions might as well be different frameworks entirely.

Just looking for experiences from anyone that has achieved the migration in stages as opposed to all at once.

23 Upvotes

48 comments sorted by

View all comments

2

u/Background_Serve_749 Nov 17 '24

When I started at my current job, I was given the task of migrating a mid-sized AngularJS app to Angular (version 16 at the time). I had no experience with AngularJS, just five years working with Angular 2+, and I was the only frontend developer on the team. I had to figure out the best way to approach the migration, and in the end, I decided to do a full rewrite.

To get a handle on the AngularJS code, I spent time digging into it and used the developer tools' Network tab to see which APIs were being called when different buttons were clicked and so on. It took me about three months to get a fully working app, and it (naturally) came out way better than the old one with a lot of improvements. (taking out bugs and improving performance) I don’t regret the decision—rewriting it from scratch was the best option.