Đi từng major version bằng ng update, đọc update guide cho version đang nhảy tới, chạy test/build sau mỗi bước và commit nhỏ theo milestone.
Ví dụ một bước migration có kiểm chứng:
ng update @angular/core@20 @angular/cli@20
ng test
ng buildTrước migration nên bật strict hơn dần nếu có thể, dọn deprecated APIs, kiểm kê third-party packages và khóa baseline performance.
Với migration lớn, tách phần cơ học do schematic xử lý khỏi refactor kiến trúc như standalone, control flow mới hoặc signals để dễ review và rollback.
Move one major version at a time with ng update, read the update guide for the target version, run tests/build after each step and commit small milestones.
Example verified migration step:
ng update @angular/core@20 @angular/cli@20
ng test
ng buildBefore migration, gradually enable stricter checks if possible, remove deprecated APIs, inventory third-party packages and capture a performance baseline.
For large migrations, separate mechanical schematic changes from architectural refactors such as standalone, new control flow or signals so review and rollback stay manageable.