liveBook · Manning

Operator

As explained in Modern Angular

An RxJS operator is a function that transforms or composes observables, typically used with the pipe method to produce a new observable.

An RxJS operator is a function used to enhance an observable. Operators can manipulate, transform, or combine streams; `map`, for example, applies a function to every emission and produces corresponding new values. RxJS includes more than 100 built-in operators and permits custom operators for application business logic. section 5.2 section 5.4.1

Apply operators with an observable’s `pipe` method. Piping composes unary functions in execution order; in RxJS, the resulting operation works with `OperatorFunction`s and can accept multiple operators. section 5.4.2

Transform each emitted number

`of(1, 2, 3).pipe(map(x => x * 10))` emits `10`, `20`, and `30`. The `map` function runs once for each source emission. section 5.4.1

Operators commonly support reactive Angular work such as:

  • Transforming or combining event streams. section 5.2
  • Handling `HttpClient` observable results. section 5.2
  • Reacting to reactive-form `valueChanges`, such as disabling an input after another value changes. section 5.2
  • Representing state that changes over time and is shared between components. section 5.2
Figure 5.2 Marble diagram of the map operator
figure

Use the marble diagram to visualize how `map` turns each source emission into a transformed output emission. section 5.4.1

How Modern Angular covers it

How deep it goes
Explains `map` emission-by-emission and `pipe` through unary function composition, while deferring signals comparisons.
Examples
Demonstrates `of(1, 2, 3)`, `merge`, `map` multiplication, and compose-versus-pipe utility functions.
What it assumes
Teaches functional programming, unary functions, composition, and piping before relating `pipe` to OperatorFunctions.
What you can do after
Apply it via RxJS `pipe` and `map` to transform observable emissions and compose stream behavior.
How it connects
Connects observables with Subjects, EventEmitter, HttpClient, reactive forms, the async pipe, and signals.

Also explained in

Compare how 2 books explain operator →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Modern Angular. The section links point to the parts of the book it draws on.