- RxJS Tutorial
- RxJS - Home
- RxJS - Overview
- RxJS - Environment Setup
- RxJS - Latest Updates
- RxJS - Observables
- RxJS - Operators
- RxJS - Working with Subscription
- RxJS - Working with Subjects
- RxJS - Working with Scheduler
- RxJS - Working with RxJS & Angular
- RxJS - Working with RxJS & ReactJS
- RxJS Useful Resources
- RxJS - Quick Guide
- RxJS - Useful Resources
- RxJS - Discussion
RxJS - Join Operator concat
This operator will sequentially emit the Observable given as input and proceed to the next one.
Syntax
concat(observables: Array): Observable
Parameters
observables − The input given is an array of Observables.
Return value
An observable is returned with a single value merged from the values of the source observable.
Example
import { of } from 'rxjs'; import { concat } from 'rxjs/operators'; let list1 = of(2, 3, 4, 5, 6); let list2 = of(4, 9, 16, 25, 36) let final_val = list1.pipe(concat(list2)); final_val.subscribe(x => console.log(x));
Output
We have concat two observables into one. Below is the output.
Advertisements