Skip to main content
Angular Signals

Module Overview

Estimated Time: 3-4 hours | Difficulty: Intermediate | Prerequisites: Module 4
Signals are Angular’s new reactive primitive introduced in v16. They provide fine-grained reactivity, enabling Angular to know exactly which parts of the template need updating, leading to better performance. What You’ll Learn:
  • Creating and reading signals
  • Computed signals for derived state
  • Effects for side effects
  • Signal patterns and best practices
  • Comparison with RxJS observables
  • Real-world signal architectures

What are Signals?


Creating Signals

WritableSignal

Signal Methods

Signals with Objects/Arrays

Signals use reference equality by default. Mutating an object/array won’t trigger updates. Always create new references.

Computed Signals

Computed signals derive values from other signals:

Computed Signal Properties


Effects

Effects run side effects when signals change:

Effect Options

Avoid writing signals in effects when possible. Use computed signals for derived state. Effects with allowSignalWrites can lead to infinite loops if not careful.

Signal Inputs and Outputs

Modern Angular provides signal-based component communication:

Signal Inputs

Model Inputs (Two-Way Binding)

Signal Outputs


Signal Patterns

Form State Management

Async Data Loading

Linked Signals


Signal vs RxJS

Converting Between Signals and RxJS


Practice Exercise

Exercise: Build a Todo App with Signals

Create a todo app with:
  1. Add/remove/toggle todos
  2. Filter (all, active, completed)
  3. Computed stats (total, completed, remaining)
  4. Persist to localStorage via effect

Summary

1

signal()

Create reactive containers for values that notify on change
2

computed()

Derive values automatically with caching and lazy evaluation
3

effect()

Run side effects when signals change, with cleanup support
4

Signal Inputs/Outputs

Modern component communication with input(), model(), output()
5

RxJS Interop

Convert between signals and observables with toSignal/toObservable

Next Steps

Next: Routing & Navigation

Build multi-page applications with Angular Router