[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 = … Read more

[Solved] HTTP call using Observable not working

You need to return the response.json() if you are using Observable return this.http.post(this.newOrderUrl, {order: order}, this.options) .map((response: Response) => response.json() ); and in your component, call using subscribe() this._myservice.placeOrder(‘somestring’).subscribe((orders: any) => { }); 1 solved HTTP call using Observable not working