Communityコーディング&開発github.com

analogjs/angular-forms

Angular v21+ の新しい Signal Forms API を使用して、シグナルベースのフォームを構築します。自動双方向バインディング、スキーマベースのバリデーション、フィールド状態管理、動的フォームに対応します。

angular-forms とは?

このスキルは、Angular v21 以降で導入された実験的な Signal Forms API を使って、シグナルベースのフォームを作成するためのものです。従来のテンプレート駆動フォームやリアクティブフォームとは異なり、シグナルによる自動双方向バインディング、スキーマベースのバリデーション、フィールドの状態管理、そして動的フォームといった機能を提供します。マルチステップフォームや条件付きフィールドを持つフォームの実装、バリデーションの追加といった場面で活用できます。このスキルは Claude Code、Cursor、Codex などの AI エージェントをサポートしており、新しい Angular プロジェクトでは Signal Forms の使用が推奨されています。ただし、シグナルを使わないテンプレート駆動フォームや、Formly、ngx-formly などのサードパーティ製フォームライブラリには使用しないでください。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/analogjs/angular-skills/tree/main/skills/angular-forms

Installed? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

angular-forms は何をしますか?

Angular v21+ の新しい Signal Forms API を使用して、シグナルベースのフォームを構築します。フォーム作成における自動双方向バインディング、スキーマベースのバリデーション、フィールド状態管理、動的フォームに使用します。フォームの実装、バリデーションの追加、マルチステップフォームの作成、条件付きフィールドを持つフォームの構築時にトリガーされます。Signal Forms は実験的な機能ですが、新しい Angular プロジェクトでは推奨されています。シグナルを使用しないテンプレート駆動フォームや、Formly、ngx-formly のようなサードパーティ製フォームライブラリには使用しないでください。

Individual skills in this repo

This repo contains 9 individual skills — each has its own dedicated page.

analogjs/angular-component

Create modern Angular standalone components following v20+ best practices. Use for building UI components with signal-based inputs/outputs, OnPush change detection, host bindings, content projection, and lifecycle hooks. Triggers on component creation, refactoring class-based inputs to signals, adding host bindings, or implementing accessible interactive components.

analogjs/angular-di

Implement dependency injection in Angular v20+ using inject(), injection tokens, and provider configuration. Use for service architecture, providing dependencies at different levels, creating injectable tokens, and managing singleton vs scoped services. Triggers on service creation, configuring providers, using injection tokens, or understanding DI hierarchy.

analogjs/angular-directives

Create custom directives in Angular v20+ for DOM manipulation and behavior extension. Use for attribute directives that modify element behavior/appearance, structural directives for portals/overlays, and host directives for composition. Triggers on creating reusable DOM behaviors, extending element functionality, or composing behaviors across components. Note - use native @if/@for/@switch for control flow, not custom structural directives.

analogjs/angular-http

Implement HTTP data fetching in Angular v20+ using resource(), httpResource(), and HttpClient. Use for API calls, data loading with signals, request/response handling, and interceptors. Triggers on data fetching, API integration, loading states, error handling, or converting Observable-based HTTP to signal-based patterns.

analogjs/angular-routing

Implement routing in Angular v20+ applications with lazy loading, functional guards, resolvers, and route parameters. Use for navigation setup, protected routes, route-based data loading, and nested routing. Triggers on route configuration, adding authentication guards, implementing lazy loading, or reading route parameters with signals.

analogjs/angular-signals

Implement signal-based reactive state management in Angular v20+. Use for creating reactive state with signal(), derived state with computed(), dependent state with linkedSignal(), and side effects with effect(). Triggers on state management questions, converting from BehaviorSubject/Observable patterns to signals, or implementing reactive data flows.

analogjs/angular-ssr

Implement server-side rendering and hydration in Angular v20+ using @angular/ssr. Use for SSR setup, hydration strategies, prerendering static pages, and handling browser-only APIs. Triggers on SSR configuration, fixing hydration mismatches, prerendering routes, or making code SSR-compatible.

analogjs/angular-testing

Write unit and integration tests for Angular v20+ applications using Vitest or Jasmine with TestBed and modern testing patterns. Use for testing components with signals, OnPush change detection, services with inject(), and HTTP interactions. Triggers on test creation, testing signal-based components, mocking dependencies, or setting up test infrastructure. Don't use for E2E testing with Cypress or Playwright, or for testing non-Angular JavaScript/TypeScript code.

analogjs/angular-tooling

Use Angular CLI and development tools effectively in Angular v20+ projects. Use for project setup, code generation, building, testing, and configuration. Triggers on creating new projects, generating components/services/modules, configuring builds, running tests, or optimizing production builds. Don't use for Nx workspace commands, custom Webpack configurations, or non-Angular CLI build systems like Vite standalone or esbuild direct usage.

関連スキル