Skip to content

Opinionated Angular 21 guide that enforces signals, standalone components, and modern templates for frontend work.

CCM score
50 of 100
skills.sh installs
758
GitHub stars
22
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers TypeScript strictness, signal-based state with computed() and resource(), reactive forms, and lazy-loaded routes
  • Includes ng-icon setup with provideIcons, NgOptimizedImage rules for static images, and Tailwind v4 styling guidance
  • Enforces OnPush change detection, input()/output() functions, and inject() over constructor injection, with native @if/@for control flow
  • Designed for Angular component, service, and template work, with WCAG AA and AXE accessibility checks required

Install

$ npx -y skills add boise-state-development/agentcore-public-stack --skill angular-best-practices -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Angular 21 Best Practices

TypeScript

  • Use strict type checking
  • Prefer type inference when type is obvious
  • Avoid any; use unknown when type is uncertain

Components

  • Always use standalone components (do NOT set standalone: true — it's the default in v20+)
  • Set changeDetection: ChangeDetectionStrategy.OnPush
  • Use input() and output() functions instead of decorators
  • Use computed() for derived state
  • Keep components small and single-responsibility
  • Prefer inline templates for small components
  • Use Reactive forms over Template-driven
  • Use class bindings instead of ngClass
  • Use style bindings instead of ngStyle
  • For external templates/styles, use paths relative to the component TS file
  • Do NOT use @HostBinding/@HostListener — use the host object in the decorator instead

State Management with Signals

  • Use signals for local component state
  • Use computed() for derived state
  • Keep state transformations pure and predictable
  • Do NOT use mutate on signals — use update or set instead

For complex derived state patterns, see references/signal-patterns.md.

Resources (Async Data)

Details

Repository
github.com/boise-state-development/agentcore-public-stack
Category
Frontend & UI Code

Similar to Angular Best Practices

More Frontend & UI Code