What used to work, no longer does...
Have an http service that returns an Observable
from a map as in:
return http.get(someUrl)
.map(res => res.json());
console shows the data successfully returned on the response. However, subscribing to the returned Observable
yields data that is undefined
. That is:
someservice.getData()
.subscribe(data => this.data = data);
Not sure what is missing.
EDIT
data is Undefined
, the map returns the correct json
http.get(someUrl)
.map(res => res.json())
.subscribe(data => console.log(data));