Signals vs observables in Angular: when to use which

IntermediateAngular interview questionBy , updated 3 December 2026

Short answer

A signal holds a current value that you read synchronously, and Angular tracks where you read it so it knows what to update. An observable is a stream of events over time that does nothing until something subscribes. Use signals for state that templates render, such as the selected tab or a filtered list. Use RxJS for async event flows that need timing, cancellation or combining, and bridge the two with toSignal and toObservable.

The core difference

Signal Observable
Models A value now Values over time
Always has a value Yes No, until it emits
Reading count(), synchronous subscribe() or the async pipe
Does work None, it stores a value When subscribed (cold observables)
Cleanup Automatic Unsubscribe, takeUntilDestroyed or async
Derived values computed(), lazy and memoized Operators such as map and combineLatest
Time and cancellation Not built in debounceTime, switchMap, takeUntil
Change detection Angular knows which views read the signal Angular learns through the async pipe or your code

The Angular docs define a signal as "a wrapper around a value that notifies interested consumers when that value changes", and state that "all signal APIs are synchronous". An observable has no current value to read; it only has the next event.

The same feature both ways

A list filtered by a search term, first with RxJS:

export class ProductsComponent {
  private products$ = inject(ProductService).products$;
  private term$ = new BehaviorSubject("");

  visible$ = combineLatest([this.products$, this.term$]).pipe(
    map(([products, term]) => products.filter((p) => p.name.includes(term))),
  );

  setTerm(term: string) {
    this.term$.next(term);
  }
}
// template: @for (p of visible$ | async; track p.id) { ... }

And with signals:

export class ProductsComponent {
  products = input.required<Product[]>();
  term = signal("");

  visible = computed(() =>
    this.products().filter((p) => p.name.includes(this.term())),
  );
}
// template: @for (p of visible(); track p.id) { ... }

The signal version has no subscription, no BehaviorSubject that needs a starting value, and no async pipe. computed only re-runs when products or term changes, and only when something reads visible. This is state, and signals are a better fit for state.

Where RxJS still wins

Anything that is about time is easier as a stream. Search-as-you-type is the classic example: wait for a pause, skip repeats, cancel the old request when a new term arrives.

export class SearchComponent {
  private http = inject(HttpClient);
  query = signal("");

  results = toSignal(
    toObservable(this.query).pipe(
      debounceTime(300),
      distinctUntilChanged(),
      switchMap((q) =>
        q ? this.http.get<Result[]>("/api/search", { params: { q } }) : of([]),
      ),
    ),
    { initialValue: [] as Result[] },
  );
}

The input writes to a signal, RxJS handles the timing and cancellation, and the template reads a signal again. That shape, signals at the edges and RxJS in the middle, is the usual answer in interviews. HttpClient, router events and form valueChanges are still observables, so most apps use both.

Bridging: toSignal and toObservable

Both come from @angular/core/rxjs-interop. The docs list the details that matter:

  • toSignal(obs$) subscribes immediately, which may trigger side effects, and unsubscribes when the component or service that called it is destroyed. Until the observable emits, the signal is undefined unless you pass initialValue. requireSync: true asserts that it emits synchronously, as a BehaviorSubject does, so no initial value is needed. If the observable errors, the error is thrown when the signal is read. It must run in an injection context, such as a constructor or field initializer, or receive an Injector.
  • toObservable(signal) uses an effect to track the signal and push values into a ReplaySubject. It emits after the signal stabilizes, so setting a signal to 1, 2 and 3 in the same task emits only 3. Do not use it when every intermediate value matters.

httpResource: data loading without RxJS

For reads that depend on signals, httpResource wraps HttpClient and gives you value, isLoading, error and hasValue as signals. It re-sends the request when a signal it reads changes and cancels the pending one first. The docs advise against using it for mutations such as POST or PUT; call HttpClient directly for those. It covers many cases that used to need switchMap.

A rule of thumb

  • Is it a value the UI shows right now? Signal.
  • Is it derived from other values? computed, not an effect.
  • Is it an event stream with timing, retries, cancellation or merging? RxJS.
  • Is it an HTTP read that depends on state? httpResource, or RxJS with switchMap.
  • Does it need to touch a non-Angular API when state changes? effect, which the docs reserve for syncing signal state to imperative APIs such as storage or logging.

You can build both primitives in Build Angular signals: signal, computed and effect and Implement RxJS combineLatest, withLatestFrom, forkJoin, zip and race, and compare the async pipe side in Build an AsyncPipe that switches sources. For the signal APIs themselves, read What are signals in Angular?.

Common follow-up questions

Signal or BehaviorSubject for service state?

A signal, in most new code. Both always hold a value, but a signal is read synchronously without subscribing, works with computed, and needs no cleanup. Expose it read-only with asReadonly(). Keep a BehaviorSubject where consumers need RxJS operators, or convert with toObservable.

toSignal or the async pipe?

Both subscribe and clean up for you. toSignal subscribes once, in the class, so the value can be used in computed and in several template places without extra subscriptions. Each | async in a template is its own subscription.

Effect or subscribe?

An effect reacts to signals; subscribe reacts to observables. Effects always run at least once and run asynchronously during change detection. Avoid both for deriving state; use computed or operators.

Is combineLatest the same as computed?

Similar in purpose, different in timing. combineLatest emits on every input emission once all inputs have a value, including intermediate combinations. computed is lazy: it recalculates only when read after a dependency changed.

Will signals replace RxJS in Angular?

Not for streams. Signals cover synchronous state well. Event streams with time and cancellation are what RxJS is for, and the interop package exists so the two meet cleanly.

Mistakes to avoid

  • Using an effect to copy one signal into another; use computed or linkedSignal

  • Calling toSignal inside a method or event handler, which creates a new subscription each time and fails outside an injection context

  • Forgetting initialValue and then handling undefined all over the template

  • Converting every observable to a signal and losing the operators that made the stream readable

  • Expecting toObservable to emit every intermediate value set in one task

Practise it in code

Interviewers rarely stop at the definition. These questions open in an editor with tests.

  1. Build Angular signals: signal, computed and effect with versions, glitch-free reads, equal and untrackedHard60 min
  2. Build Angular's linkedSignal and resource(): params, loader aborts, status values, reload and local setHard60 min
  3. Build Angular pure and impure pipes and an AsyncPipe that switches sources and ignores late valuesMedium35 min
  4. Implement RxJS combineLatest, withLatestFrom, forkJoin, zip and race with exact completion rulesHard55 min
  5. Implement RxJS BehaviorSubject, ReplaySubject, AsyncSubject and shareReplay with refCountMedium45 min
  6. Build RxJS time operators on a virtual scheduler: debounceTime, throttleTime, delay and takeUntilMedium40 min