I would expect that my case is common but can't really find anything appropriate. What I want to achieve, in Angular2
/ RxJS 5
is this:
source: ---1--2--3--4---------5--------6-|-->
notifier: -o------------o-----o---o--o-o------>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
output: ---1----------2-----3---4--5---6-|-->
So, I have a source Observable that emits values, and I want each of them to get into the output only when a second Observable (call it notifier) emits. It's like one event from the notifier means "allow next to pass through".
I tried delayWhen
, but my main problem with this is that all the source values are waiting for the same one event from the notifier, so for example if 3 source values are "queued" and notifier emits once, all 3 values pass through, which is not what I want.