What is a signal in Angular?
signal in Angular is a new reactive primitive (starting with Angular 16) that stores a value and lets Angular automatically track who reads that value and who needs to be updated when it changes. It is an alternative to streams (RxJS) in simple scenarios and a replacement for @Input(), @Output(), BehaviorSubject, and part of the zone-based machinery.
What it looks like
ts
import { signal } from '@angular/core';
const counter = signal(0);
console.log(counter()); // read the value
counter.set(1); // set a new value
counter.update(v => v + 1); // change based on the previous oneHow it works underneath
signal()creates a value store- reading is calling
counter() - writing is
set()orupdate() - Angular tracks which expressions read the signal, and on change updates only the related templates, effects, or computed signals
Related entities
computed(), a computed value based on other signalseffect(), a reaction to signal changes (e.g. logging or calling a method)
Where it is typically used
- component state without RxJS
- storing UI state (filters, flags, counters)
- simple reactivity in a template without subscriptions and the
asyncpipe
Main difference from RxJS
| Signals | RxJS |
|---|---|
| Pull model | Push model |
| State is a single value | Streams of events |
| Minimal subscriptions | Subscriptions are required |
| Simple for local state | Complex asynchronous scenarios, event handling |
Summary: signal is a new reactive state mechanism in Angular that simplifies reactivity inside components and makes it declarative. RxJS remains in place for complex streams and asynchronous logic.
Short Answer
Interview readyPremium
A concise answer to help you respond confidently on this topic during an interview.