All skills
wshobson avatar

/angular-migration

@be57c0b
by Seth Hobsonwshobson/agents40k stars
4,281

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.

Use this Skill: https://skilld.dev/gh/wshobson/agents/angular-migration

This session only. Nothing lands on disk.

referencesdetails.md

≈455 tokens on demand. Your agent reads this file only when SKILL.md points to it.

angular-migration — additional patterns and templates

Forms Migration

<!-- 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>
// 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

Source: SKILL.md on GitHub

No alerts16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    This skill provides guidance and structural templates for migrating legacy AngularJS code to contemporary Angular versions. It does not introduce code patterns or configurations that compromise system integrity or data privacy.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer6mo

    1 file scanned · No issues

  • ZeroLeaks5mo

    2 findings · Score: 80/100

Signed by skilld at be57c0b. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated 4 months ago
  • TypeScript
  • angularjs
  • angular
  • migration
  • hybrid
  • component
  • dependency-injection
  • routing
  • upgrade

README badge

README badge for wshobson/agents/angular-migration

Migrate AngularJS applications to Angular using hybrid mode with ngUpgrade, allowing incremental component and service rewriting alongside dependency injection updates. Covers three migration strategies (big bang, incremental, vertical slice), hybrid app bootstrapping, controller-to-component conversion, directive modernization, service updates, and routing migration from AngularJS to Angular Router.

Generated from the current SKILL.md.

Does this skill cover AngularJS 1.x to Angular 2+ migrations?
Yes. The skill covers migrating from AngularJS (1.x) to modern Angular (2+) using hybrid mode with ngUpgrade, incremental component rewriting, and dependency injection updates.
Can I run AngularJS and Angular side-by-side during migration?
Yes. The skill documents the hybrid approach using UpgradeModule, which allows AngularJS and Angular to coexist and interoperate while you migrate incrementally.
Does this skill show how to migrate routing from AngularJS to Angular?
Yes. The skill includes examples of converting AngularJS $routeProvider configuration to Angular RouterModule and Routes.
What migration strategies does this skill cover?
The skill documents three strategies: Big Bang (complete rewrite), Incremental (hybrid approach with feature-by-feature migration), and Vertical Slice (one feature completely migrated at a time).
Does this skill cover service and controller migration patterns?
Yes. The skill includes patterns for converting AngularJS controllers and services to Angular components and injectable services, plus upgrading and downgrading dependencies between frameworks.

Generated from the current SKILL.md. These answers refresh after source changes.