0Pricing
Angular Academy · Lesson

Combination Operators

Combine streams with combineLatest and forkJoin.

Why combine streams

Real apps coordinate multiple async sources: several HTTP calls, a form value plus a filter, a click plus the latest state. Combination operators merge multiple observables into one.

combineLatest

combineLatest emits an array of the latest value from each source whenever any source emits — after all have emitted at least once.

import { combineLatest } from 'rxjs';

combineLatest([name$, age$]).subscribe(
  ([name, age]) => console.log(name, age)
);
// re-emits whenever name$ OR age$ changes

All lessons in this course

  1. Transformation Operators
  2. Filtering Operators
  3. Combination Operators
  4. Error Handling Operators
← Back to Angular Academy