RxJS: How to not subscribe to initial value and/or undefined?
mySubject.pipe( skipWhile( v => !v ) );
As mentioned by Will you should be able to just skip the first value by using the skip operator:
var mySubject = new Rx.BehaviorSubject(undefined);
mySubject.pipe(skip(1)).subscribe(function(value) {
// do something with the value
});
Use new Rx.ReplaySubject(1)
instead of BehaviorSubject
.