angular-signals

Convert Angular Observable and BehaviorSubject patterns to signal-based reactive state.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/shapris/svarus-darbas --skill angular-signals-shapris
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: angular-signals
Source: https://github.com/shapris/svarus-darbas/tree/main/.kilocode/skills/angular-signals
Command: npx skills add https://github.com/shapris/svarus-darbas --skill angular-signals-shapris

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Replace complex Observable and BehaviorSubject patterns with synchronous, fine-grained reactive state to reduce subscription boilerplate, stale state, and fragile update flows in Angular applications.

Core Features & Use Cases

  • Writable and derived state: create and update signals and computed values to express primary state and selectors.
  • Dependent selection and reset: use linkedSignal patterns to preserve or reset selections when source collections change.
  • Side effects and lifecycle awareness: run and clean up reactive side effects via effect() in injection contexts.
  • RxJS interop and async resources: convert Observables to signals and back, and use resource() for parameterized async loading, debounced searches, and optimistic updates.
  • Service/store patterns and testing: centralize state in signal-based stores with readonly selectors, expose loading/error signals, and test reactive behavior deterministically.

Quick Start

Create a writable count signal initialized to 0 and a computed fullName derived from firstName and lastName, then ask the assistant to explain how updates propagate and where to place effects.

Frequently Asked Questions about angular-signals

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

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

Angular signals replace BehaviorSubject patterns using writable signal() state and computed() for derived selectors. Leverage RxJS interop functions like toSignal and toObservable to bridge existing Observable data streams into fine-grained reactive state without losing async behavior.

What is the best way to create dependent dropdown selections with linkedSignal in Angular?

Use linkedSignal in Angular to maintain dependent selections that automatically reset or preserve their chosen state when the underlying source collection updates. This fine-grained reactive approach eliminates manual subscription management and prevents stale selection data.

How do I handle async resource loading and debounced search in Angular v20?

The resource() API handles parameterized async loading, debounced searches, and optimistic updates in Angular v20+. It exposes loading and error signals directly, allowing components to deterministically track async state without manual Observable subscription wiring.

Should I use Angular signals or RxJS Observables for reactive state management?

Angular signals offer synchronous, fine-grained reactive state management that reduces subscription boilerplate compared to RxJS Observables. Use signals for primary state and derived selectors, while reserving RxJS interop for existing async data streams and complex event pipelines.

How do I test signal-based stores and reactive state in Angular?

Test signal-based Angular stores by centralizing state with readonly selectors and exposing loading or error signals. This deterministic reactive behavior allows you to verify state updates and side effects without dealing with asynchronous subscription timing issues.

Can I run side effects with effect() outside the injection context in Angular?

effect() requires an injection context to run and clean up reactive side effects in Angular v20+. This lifecycle awareness ensures proper cleanup, meaning you should use it within components or services where the injection context is available.