2

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));
SnareChops
  • 13,175
  • 9
  • 69
  • 91
Tim McNamara
  • 1,368
  • 2
  • 10
  • 11

1 Answers1

2

Yes. There is small change in the module of map operator, Here is commit link

Before while importing rxjs operators, below is used

rxjs/add/operators/map 

now its changed to

rxjs/add/operator/map

Angular2 beta 2.0.3 Changelog.md

Pankaj Parkar
  • 134,766
  • 23
  • 234
  • 299