--- name: angular-signals description: Writes modern Angular code using Standalone Components and Signals. Use whenever generating frontend UI or state logic. --- # Modern Angular Standards ## Architecture - NEVER generate or use `NgModule`. - ALL components, directives, and pipes must be `standalone: true`. ## State Management (Signals) - Prefer Angular Signals (`signal()`, `computed()`, `effect()`) for synchronous, local component state instead of `BehaviorSubject`. - Use the new Signal-based inputs and outputs: `input()` and `output()` instead of `@Input()` and `@Output()`. - Use standard RxJS strictly for asynchronous streams (e.g., HTTP requests, router events). ## Control Flow - Use the new built-in control flow (`@if`, `@for`, `@switch`) instead of structural directives (`*ngIf`, `*ngFor`).