Home › Angular › Angular 20 Copilot instructions

Angular 20 Copilot instructions

Copilot instructions for Angular 20 apps using standalone components, signals, and the new control flow.

GitHub CopilotAngular

How to use

Save this as .github/copilot-instructions.md in your repository root, commit it, and your agent will pick it up automatically. Edit the commands to match your project.

.github/copilot-instructions.mdDownload  
# Angular 20 project instructions

## Conventions
- Standalone components only; no new `NgModule`s. Generate with `ng generate component feature/name`.
- State: signals (`signal`, `computed`, `linkedSignal`) and `input()` / `output()` / `model()` functions instead of `@Input`/`@Output` decorators.
- Templates use built-in control flow (`@if`, `@for` with `track`, `@switch`, `@defer`), not `*ngIf`/`*ngFor`.
- Inject with `inject()` in field initializers rather than constructor parameters.
- Set `changeDetection: ChangeDetectionStrategy.OnPush` on every component. Assume the app may run zoneless; don't rely on zone.js side effects.
- HTTP: `HttpClient` in a feature service; expose results via `toSignal()` or `httpResource()` where the project already uses it. Unsubscribe with `takeUntilDestroyed()`.
- Forms: typed reactive forms (`FormGroup<{...}>`), validators in the component class.
- Routes are lazy: `loadComponent: () => import(...)`. Guards and resolvers are functions.

## Don't
- Don't use `any`, `subscribe` inside `subscribe`, or manual `ChangeDetectorRef.detectChanges()` as a fix.
- Don't touch `angular.json` budgets to make a build pass.

## Before finishing
Run `ng lint`, `ng test --watch=false`, and `ng build`.

Related rules

Code review Copilot instructions

Copilot instructions focused on pull request review: what to flag, severity labels, and how to word comments.

GitHub CopilotAgent workflows

C# / .NET Copilot path instructions

Path-specific Copilot instructions for C# files on .NET 10: nullable types, async, records, and logging.

GitHub Copilot.NET / ASP.NET Core

Dockerfile Copilot path instructions

Path-specific Copilot instructions for Dockerfiles and compose files: multi-stage builds, non-root, and pinned images.

GitHub CopilotDocker

Markdown docs Copilot path instructions

Path-specific Copilot instructions for Markdown docs and READMEs: structure, runnable commands, and concise style.

GitHub CopilotAgent workflows

Get new rules weekly

One email a week: fresh rule files, agent tips, and what's changing in Cursor, Claude Code and Copilot. Free, unsubscribe anytime.

Opens the Rulestack Newsletter on beehiiv in a new tab. Or subscribe directly on beehiiv.