
Angular Migration
Migrate legacy AngularJS apps to modern Angular with concrete form patterns, hybrid setup, and a phased timeline.
Overview
angular-migration is an agent skill for the Build phase that supplies AngularJS-to-Angular migration patterns, especially forms and a phased rollout timeline.
Install
npx skills add https://github.com/wshobson/agents --skill angular-migrationWhat is this skill?
- Side-by-side AngularJS ng-model/ng-submit vs Angular template-driven and reactive FormBuilder examples
- Reactive forms pattern with Validators.required and Validators.email
- Phased migration timeline: Setup (1–2 weeks) through Infrastructure and beyond
- Hybrid app and Angular CLI setup called out in Phase 1
- Forms migration as a repeatable template for other component upgrades
- Phase 1 setup window: 1–2 weeks in the documented migration timeline
Adoption & trust: 7k installs on skills.sh; 36.5k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your app still runs AngularJS forms and directives while the rest of the stack needs modern Angular modules and tooling.
Who is it for?
Maintainers of legacy AngularJS SPAs who are starting a hybrid migration and need form-level code templates plus schedule scaffolding.
Skip if: Greenfield Angular 17+ apps with no AngularJS footprint, or migrations where the primary work is RxJS/state architecture rather than template/forms uplift.
When should I use this skill?
When migrating AngularJS applications to Angular, especially forms, hybrid setup, and phased infrastructure work.
What do I get? / Deliverables
You get concrete Angular form components, validator setup, and a week-bucketed plan to stand up CLI, hybrid mode, and incremental UI migration.
- Migrated form components using template-driven or reactive patterns
- Phased migration checklist aligned to Setup and Infrastructure phases
Recommended Skills
Journey fit
How it compares
Pattern library for incremental framework uplift, not a one-shot codegen scaffolder or end-to-end E2E test pack.
Common Questions / FAQ
Who is angular-migration for?
Solo and indie frontend builders maintaining AngularJS code who need agent-guided snippets and a structured migration schedule.
When should I use angular-migration?
In the Build phase while refactoring user-facing forms and standing up Angular CLI plus hybrid hosting before wider component rewrites.
Is angular-migration safe to install?
It is documentation-style patterns only; review the Security Audits panel on this Prism page and validate generated migrations in your own test suite.
SKILL.md
READMESKILL.md - Angular Migration
# angular-migration — additional patterns and templates ## Forms Migration ```html <!-- Before: AngularJS --> <form name="userForm" ng-submit="saveUser()"> <input type="text" ng-model="user.name" required /> <input type="email" ng-model="user.email" required /> <button ng-disabled="userForm.$invalid">Save</button> </form> ``` ```typescript // After: Angular (Template-driven) @Component({ template: ` <form #userForm="ngForm" (ngSubmit)="saveUser()"> <input type="text" [(ngModel)]="user.name" name="name" required> <input type="email" [(ngModel)]="user.email" name="email" required> <button [disabled]="userForm.invalid">Save</button> </form> ` }) // Or Reactive Forms (preferred) import { FormBuilder, FormGroup, Validators } from '@angular/forms'; @Component({ template: ` <form [formGroup]="userForm" (ngSubmit)="saveUser()"> <input formControlName="name"> <input formControlName="email"> <button [disabled]="userForm.invalid">Save</button> </form> ` }) export class UserFormComponent { userForm: FormGroup; constructor(private fb: FormBuilder) { this.userForm = this.fb.group({ name: ['', Validators.required], email: ['', [Validators.required, Validators.email]] }); } saveUser() { console.log(this.userForm.value); } } ``` ## Migration Timeline ``` Phase 1: Setup (1-2 weeks) - Install Angular CLI - Set up hybrid app - Configure build tools - Set up testing Phase 2: Infrastructure (2-4 weeks) - Migrate services - Migrate utilities - Set up routing - Migrate shared components Phase 3: Feature Migration (varies) - Migrate feature by feature - Test thoroughly - Deploy incrementally Phase 4: Cleanup (1-2 weeks) - Remove AngularJS code - Remove ngUpgrade - Optimize bundle - Final testing ``` --- name: angular-migration description: Migrate from AngularJS to Angular using hybrid mode, incremental component rewriting, and dependency injection updates. Use when upgrading AngularJS applications, planning framework migrations, or modernizing legacy Angular code. --- # Angular Migration Master AngularJS to Angular migration, including hybrid apps, component conversion, dependency injection changes, and routing migration. ## When to Use This Skill - Migrating AngularJS (1.x) applications to Angular (2+) - Running hybrid AngularJS/Angular applications - Converting directives to components - Modernizing dependency injection - Migrating routing systems - Updating to latest Angular versions - Implementing Angular best practices ## Migration Strategies ### 1. Big Bang (Complete Rewrite) - Rewrite entire app in Angular - Parallel development - Switch over at once - **Best for:** Small apps, green field projects ### 2. Incremental (Hybrid Approach) - Run AngularJS and Angular side-by-side - Migrate feature by feature - ngUpgrade for interop - **Best for:** Large apps, continuous delivery ### 3. Vertical Slice - Migrate one feature completely - New features in Angular, maintain old in AngularJS - Gradually replace - **Best for:** Medium apps, distinct features ## Hybrid App Setup ```typescript // main.ts - Bootstrap hybrid app import { platformBrowserDynamic } from "@angular/platform-browser-dynamic"; import { UpgradeModule } from "@angular/upgrade/static"; import { AppModule } from "./app/app.module"; platformBrowserDynamic() .bootstrapModule(AppModule) .then((platformRef) => { const upgrade = platformRef.injector.get(UpgradeModule); // Bootstrap AngularJS upgrade.bootstrap(document.body, ["myAngularJSApp"], { strictDi: true }); }); ``` ```typescript // app.module.ts import { NgModule } from "@angular/core"; import { BrowserModule } from "@angular/platform-browser"; import { UpgradeModule } from "@angular/upgrade/static"; @NgModule({ imports: [BrowserModule, UpgradeModule], }) export class AppModule { constructor(private upgrade: UpgradeModule) {} ngDoBootstrap() { // Bootstrapped manually in main.ts