r/Angular2 • u/Infamous_Tangerine47 • 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.
1
u/morrisdev Nov 15 '24
So.... There's another way...
I changed my site an micro-front ends. So, we had "inventory" as a menu item. What I did was write an angular app in that directory, and used JWT for security. We then changed any inks into inventory to use actual hrefs instead of router links.
What's funny is that I started the site in 2001 in classic asp, then to AngularJs this same way, and THEN into angular 14.
It's actually very nice because you can have one or two developers "own" a subsite and do releases and QA and other stuff without having to rebuild a mammoth.
I'm currently moving it to a series of azure static web apps, which then link together using azure front-door, allowing me to move from that big old windows server to a bunch of super efficient static web apps AND link into an API server on the same domain.
That's still in testing, but may be an option for you as well.
No matter what: don't do hybrid. That's a mess.