Working with RxJS operators using static methods
In this recipe, you'll learn to use RxJS operators' static methods to work with streams. We'll start with a basic app in which you can start listening to a stream with the interval
method. We'll then introduce some static methods in the subscription to modify the output, to see it on the user interface (UI). After that, we'll split the streams using the partition
static operator. And finally, we'll be merging the partitioned streams using the merge
static operator to see their output.
Getting ready
The project for this recipe resides in chapter05/start_here/rxjs-operators-static-methods
.
- Open the project in VS Code.
- Open the Terminal and run
npm install
to install the dependencies of the project. - Once done, run
ng serve -o
.This should open the app in a new browser tab, and you should see something like this: