If you're working on Angular 17+ projects, this skill teaches Claude the new control flow syntax that replaced the old structural directives. Instead of *ngIf and *ngFor, you get @if, @for, @switch, and @defer with cleaner templates and better performance. The @defer block is especially nice for lazy loading heavy components on viewport or hover. The skill includes migration commands and practical examples with signals, track functions for loop optimization, and @empty blocks for handling empty states. It's straightforward reference material that covers the syntax shift Angular made in 2023, so Claude won't try to write the old directive syntax when you're on a modern codebase.

skills.sh installs
170
GitHub stars
7
last updated
Aug 21, 2026

Install

$ npx -y skills add oguzhan18/angular-ecosystem-skills --skill angular-control-flow --agent claude-code

Installs into .claude/skills of the current project.

Files

Angular Control Flow

Version: Angular 17+ (2025) Tags: Control Flow, @if, @for, @switch, @defer

References: Control Flow • Deferrable Views

API Changes

This section documents recent version-specific API changes.

  • NEW: @if replaces *ngIf — New control flow syntax

  • NEW: @for replaces *ngFor — New loop syntax with track

  • NEW: @switch replaces ngSwitch — New switch syntax

  • NEW: @defer — Lazy load components

  • DEPRECATED: *ngIf, *ngFor, *ngSwitch — Migrate to new syntax

Best Practices

  • Use @if for conditionals
@Component({
  template: `
    @if (isLoggedIn) {
      <p>Welcome!</p>
    } @else {
      <p>Please login</p>
    }
  `
})
export class MyComponent {
  isLoggedIn = signal(false);
}
  • Use @else if
@Component({
  template: `
    @if (user.role === 'admin') {
      <p>Admin panel</p>
    } @else if (user.role === 'user') {
      <p>User dashboard</p>
    } @else {
      <p>Guest view</p>
    }
  `
})
export class MyComponent {}
  • Use @for for loops

Sponsors

Details

Repository
github.com/oguzhan18/angular-ecosystem-skills
Category
Frontend Development
First seen
Jun 3, 2026

More from oguzhan18/angular-ecosystem-skills

All 45
1oguzhan18 avatarangular-zonelessoguzhan18/angular-ecosystem-skillsALWAYS use when working with Angular Zoneless, zoneless change detection, provideZonelessChangeDetection, or removing zone.js in Angular applications.170skills.sh installs
2charleswiltgen avataraxiom-ui-recordingcharleswiltgen/axiomUse when setting up UI test recording in Xcode 26, enhancing recorded tests for stability, or configuring test plans for multi-configuration replay. Based on WW169skills.sh installs
3oguzhan18 avatarangular-signals-httpoguzhan18/angular-ecosystem-skillsALWAYS use when working with Angular Signals and HttpClient, toSignal, toObservable, or HTTP with signals.169skills.sh installs
4oguzhan18 avatarangular-injectoroguzhan18/angular-ecosystem-skillsALWAYS use when working with Angular Injector, inject() function, Provider, or dependency resolution in Angular.165skills.sh installs
5thebushidocollective avatarstorybook-component-documentationthebushidocollective/hanUse when creating or improving component documentation in Storybook. Helps generate comprehensive docs using MDX, autodocs, and JSDoc comments.165skills.sh installs
6flora131 avatartypescript-react-reviewerflora131/atomictypescript react reviewer160skills.sh installs