[Solved] RXJS Switchmap – is it possible on value


Wrap your simply value inside an Observable “Everything is a Stream”

Observable.of(yourValue).switchMap(yourSwitchMapFunction)

@pixelbits the constructor of a Subject doesn’t have any parameter, and less a value, since the productor of values of the Subject are outside the stream, if you want to use a Subject you need to do something like this:

const mySubject = new Subject<string>();
mySubject.switchMap(mySwitchMapFunction);

mySubject.next(myValue);

solved RXJS Switchmap – is it possible on value