angular-signals

Convert Angular v20+ BehaviorSubject and Observable patterns to signal-based state management.

Updated Mar 1, 2026
One-click install
npx skills add https://github.com/Zoppy-crm/.github --skill angular-signals-zoppy-crm
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: angular-signals
Source: https://github.com/Zoppy-crm/.github/tree/main/skills/frontend/angular-signals
Command: npx skills add https://github.com/Zoppy-crm/.github --skill angular-signals-zoppy-crm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Migrates and modernizes Angular state management from Observable/BehaviorSubject patterns to synchronous, fine-grained signal primitives to reduce complexity, improve reactivity, and simplify derived state and side effects handling.

Core Features & Use Cases

  • Writable and Derived State: Use signal() for writable state and computed() for derived values to keep UI in sync with minimal boilerplate.
  • Dependent State & Reset Semantics: Use linkedSignal() to maintain dependent selections that auto-reset when their source changes, preserving or recalculating previous values when appropriate.
  • Side Effects and Cleanup: Use effect() within injection contexts for deterministic side effects with automatic cleanup on component destroy, and interoperate with RxJS using toSignal/toObservable and resource() for async loading.
  • Use Case: Convert a complex form and list management flow that used BehaviorSubjects and manual subscriptions into a signal-based store with computed selectors, resource-backed loading, and optimistic updates with rollback.

Quick Start

Create an Angular component or service that replaces BehaviorSubject-based state with signal(), computed(), linkedSignal(), and effect() while using toSignal/toObservable for RxJS interop.

Frequently Asked Questions about angular-signals

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert BehaviorSubject patterns to Angular signals?▼

Replace BehaviorSubject patterns with Angular signals by using signal() for writable state, computed() for derived selectors, and toSignal() to bridge existing RxJS observables into fine-grained reactive state.

What is the difference between computed() and linkedSignal() in Angular reactive state?▼

computed() derives read-only state from existing signals, whereas linkedSignal() maintains dependent selections that automatically reset or recalculate their previous values when the source signal changes.

How do I interop between RxJS Observables and Angular signals?▼

Use toSignal() to convert RxJS Observables into Angular signals and toObservable() to convert signals back into RxJS streams, enabling seamless interop for effect-driven side effects.

When should I use the Angular resource API instead of signals?▼

Use the Angular resource API instead of standard writable signals when you need to handle asynchronous data loading, enabling resource-backed fetching, loading state management, and optimistic updates with rollback.

Does Angular signal effect() cleanup work automatically outside of injection contexts?▼

Angular signal effect() cleanup works automatically within injection contexts, destroying safely on component teardown. Outside injection contexts, manual cleanup is required to prevent memory leaks in side effects.