typescript - Is Observable broken in Angular 2 Beta 3? -
what used work, no longer does...
have http service returns observable
map in:
return http.get(someurl) .map(res => res.json());
console shows data returned on response. however, subscribing returned observable
yields data undefined
. is:
someservice.getdata() .subscribe(data => this.data = data);
not sure missing.
edit
data undefined
, map returns correct json
http.get(someurl) .map(res => res.json()) .subscribe(data => console.log(data));
yes. there small change in module of map
operator, here commit link
before while importing rxjs operators
, below used
rxjs/add/operators/map
now changed to
rxjs/add/operator/map
angular2 beta 2.0.3 changelog.md
Comments
Post a Comment