Skip to content
Skills Library
Programming · Building & coding

Angular Control Flow v21 Migration

/Angular Control Flow v21 Migration

Adopt Angular built-in control flow syntax in bounded post-upgrade modernization slices after Angular 21 is stable. Use when replacing *ngIf, *ngFor, and *ngSwitch with @if, @for, and @switch in a controlled feature slice, not during a version hop.

Repository
ngautopilot ↗
Licence
MIT
Last repository change
25.10.2026

Assessment and security

80/ 100Class: good
Format15 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 25.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Adopt Angular built-in control flow syntax in bounded post-upgrade modernization slices after Angular 21 is stable. Use when replacing *ngIf, *ngFor, and *ngSwitch with @if, @for, and @switch in a controlled feature slice, not during a version hop.

Original author description

Adopt Angular built-in control flow syntax in bounded post-upgrade modernization slices after Angular 21 is stable. Use when replacing *ngIf, *ngFor, and *ngSwitch with @if, @for, and @switch in a controlled feature slice, not during a version hop.

How it works

  1. Purpose
  2. When to Use
  3. When Not to Use
  4. Required Inputs
  5. Procedure
  6. Do
  7. Do Not
  8. Review Checklist
  9. Expected Output
  10. Exit Criteria
Original SKILL.md headings · 63 lines, 244 words
SKILL.md preview
---
id: angular.modernization.angular-control-flow-v21-migration
name: Angular Control Flow v21 Migration
description: >
  Adopt Angular built-in control flow syntax in bounded post-upgrade modernization slices after Angular 21 is stable. Use when replacing *ngIf, *ngFor, and *ngSwitch with @if, @for, and @switch in a controlled feature slice, not during a version hop.
stack:
  - Angular
  - TypeScript
category: modernization
status: stable
version: 0.11.0
owner: NgAutoPilot
triggers:
  - control flow migration
  - "@if"
  - "@for"
  - "@switch"
  - structural directives modernization
compatibility:
  angular:
    min: "21"
---

# Angular Control Flow v21 Migration

## Purpose

Adopt Angular built-in control flow syntax in bounded modernization slices after Angular 21 is stable.

## When to Use

- The app is already on stable Angular 21.
- The team wants to replace structural directive boilerplate incrementally.
- The change is modernization, not a version upgrade.

## When Not to Use

- The app is still in a version hop.
- The app is not on a version that supports control flow.

## Required Inputs

- templates using `*ngIf`
- templates using `*ngFor`
- templates using `*ngSwitch`
- tests for the target slice

## Procedure

1. Select a bounded feature area.
2. Replace one structural directive family at a time.
3. Keep `track` expressions deliberate.
4. Validate rendering, accessibility, and tests.

## Do

- Prefer incremental conversion.
- Keep fallback and empty states explicit.
- Validate nested template behavior.

## Do Not

- Do not convert the whole app in one pass.
- Do not mix this with a version upgrade.
- Do not change business logic while changing template syntax.

## Review Checklist

- [ ] Slice is bounded.
- [ ] Rendering is equivalent or intentionally changed.
- [ ] Tests pass.
- [ ] Remaining template debt is documented.

## Expected Output

1. Slice converted to built-in control flow.
2. Remaining structural directives.
3. Test result.
4. Follow-up list.

## Exit Criteria

- Adoption is incremental.
- The next slice is clear.

Versions

The database has no other skills named Angular Control Flow v21 Migration.

Identical content appears in 1 other GitHub folders. We show one copy with the highest score.

Database snapshot: 13.11.2026 · package version 3b7d08bda3c8 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 80Angular Control Flow v19 Migration
    Adopt Angular built-in control flow syntax in bounded post-upgrade modernization slices after Angular 19 is stable. Use when replacing *ngIf, *ngFor, and *ngSwitch with @if, @for, and @switch in a controlled feature slice, not during a version hop.
  • 80Angular Control Flow v20 Migration
    Adopt Angular built-in control flow syntax in bounded post-upgrade modernization slices after Angular 20 is stable. Use when replacing *ngIf, *ngFor, and *ngSwitch with @if, @for, and @switch in a controlled feature slice, not during a version hop.
  • 100angular-conventions
    Angular 18-21 project structure, standalone components vs NgModule, control flow (@if/@for/@switch + *ngIf/*ngFor legacy), decorators, dependency injection (inject() function), lifecycle hooks, pipes, Angular Universal SSR pointer. Use this skill to: - Detect project style…
  • 100fe-angular
    Writes and reviews Angular 22 components, templates and services - signals, built-in control flow, zoneless and OnPush defaults, SSR and hydration, NgOptimizedImage, router accessibility, DomSanitizer - for fast, accessible apps. Use when editing a .component.ts or…
  • 96angular-conventions
    Modern Angular (v18+) coding standards — signals, standalone, OnPush, inject(), built-in control flow. Use when writing, refactoring or reviewing Angular code.
  • 100angular
    Covers Angular across supported versions (19, 20, and 21): the component model (standalone default), dependency injection, change detection (Zone.js vs zoneless), routing, template syntax (built-in control flow), RxJS integration, forms (reactive, template-driven, and signal…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.