Angular Control Flow Migration
Migrates Angular templates from legacy structural directives to modern built-in control flow syntax for improved performance and readability.
This skill facilitates the incremental modernization of Angular applications by replacing legacy directives like *ngIf, *ngFor, and *ngSwitch with the optimized @if, @for, and @switch syntax introduced in Angular 17. It is designed for use in stable post-upgrade environments, allowing development teams to modernize specific feature slices safely without disrupting business logic or complicating version hops. By automating the boilerplate transformation, it ensures consistent implementation of new features like the required 'track' property in loops and explicit fallback states.
Key Features
012 GitHub stars
02Migrates *ngSwitch structures to the cleaner @switch, @case, and @default syntax.
03Validates template rendering and accessibility during the migration process.
04Transforms *ngFor loops into @for blocks with optimized track expressions.
05Converts *ngIf and *ngIf-else blocks to modern @if and @else syntax.
06Supports incremental, slice-based refactoring to minimize regression risks.
Use Cases
01Standardizing template syntax across large enterprise codebases to match modern Angular best practices.
02Reducing template boilerplate and improving build-time type checking in legacy modules.
03Modernizing a specific UI component library after a successful Angular 17 upgrade.