combine
Combine two observables with a map function and an optional pre-treatment.
Note: you can use the pre-treatment to add a filter, a distinctUntilChanged,
any other operator that can be used in a pipe, or even an UntilDestroy
operator.
Available since v1.0.0
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
source1 | Observable<T> | first source of data |
source2 | Observable<U> | second source of data |
map | function | way to combine data |
options | combineOptions<T, U> | options for the combineLatest operator (optional) |
Returns
Section titled “Returns”Observable<R> — an observable that emits the result of the map function
Examples
Section titled “Examples”Combine two observables with a map
Section titled “Combine two observables with a map”Combines the latest values of two observables using a mapping function.
