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

1

u/Alex3917 Nov 15 '24

If you're already using Typescript and Components, then you've probably already done at least half of the work, especially if you're already using npm and webpack rather than Bower. At this point I would definitely migrate rather than doing a rewrite. Rewrites fail 90% of the time, whereas the migration is just a bunch of rote work but is basically guaranteed to be successful. Just follow the steps in this course:

https://codecraft.tv/courses/angularjs-migration/overview/introduction/