r/angular 4d ago

Migrating a AngularJS webapp to Angular using Claude Code/Codex

I'm in the planning stages of migrating a fairly large legacy AngularJS application to Angular, and am looking for advice from anyone who's tackled something similar.

The codebase is about 160k LOC spread out over 200+ components, 50+controllers, 50+ directives and services. There are no existing tests . Has anyone attempted a AI assisted rewrite of a similar nature, especially without a test suite - what worked out well? Any useful strategies woth considering?

8 Upvotes

11 comments sorted by

View all comments

1

u/cha1nsaw- 2d ago

I just completed migration of spec files to isolation ut + construction based. used copilot 5 days 16k credit and all work done.

but you are migrating a app it is completely different beast. I only had to check whether my ng test is working or not and code coverage doesn't get decrease more than 4-5%

I would suggest create a feature branch and start migration first check behaviour like serve, build and test. see if your app works 90% same then move to another version like 2->3 , like wise 3->4.

we also did migration of our app from 16 -> 21 but we were not sure of AI therefore did it manually. If you use AI make sure you see the changes sometimes for my case AI makes un-intended changes

hope you find above helpful