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`.

More: all Angular rules · all GitHub Copilot rules

Related rules

React + TypeScript Copilot path instructions

Path-specific Copilot instructions for React 19 + TypeScript .tsx files: components, hooks, accessibility, and tests.

GitHub CopilotReact

Astro content site rules

Cursor rules for Astro 5 sites with content collections, islands, and zero-JS-by-default pages.

CursorAstro

Chrome extension (Manifest V3) rules

Cursor rules for building Manifest V3 browser extensions with TypeScript and minimal permissions.

CursorChrome extensions

htmx + server-rendered HTML AGENTS.md

AGENTS.md for htmx 2 apps with server-rendered templates (any backend), partials, and progressive enhancement.

AGENTS.mdhtmx

Next.js App Router (TypeScript) rules

Cursor project rules for Next.js 15 App Router apps with TypeScript, Server Components, and Tailwind.

CursorNext.js

Next.js CLAUDE.md

A CLAUDE.md for Claude Code working in a Next.js + Prisma + Tailwind codebase.

Claude Code (CLAUDE.md)Next.js

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.