Reputation: 243
With observableTimer(0, 5000).pipe(...)
I can set the dueTime
as a first param, so if I put 0 I won't have an initial delay.
How you can achieve same thing with delay
operator?
myObservable$.pipe(
delay(5000) // need to skip initial delay
)
Any ideas?
Upvotes: 2
Views: 427
Reputation: 9425
You can add the delay conditionally:
.concatMap((itm, idx) => idx == 0 ? Observable.of(itm) : Observable.of(itm).delay(5000))
Upvotes: 1