refactor(async): use ultralight Observable

Closes #5283
This commit is contained in:
Rob Wormald
2015-11-14 00:02:57 -08:00
committed by Jeremy Elbourn
parent ad99199d50
commit a16ac84840
10 changed files with 83 additions and 53 deletions

View File

@ -16,8 +16,6 @@ import {Http, Response} from 'angular2/http';
export class HttpCmp {
people: Object[];
constructor(http: Http) {
http.get('./people.json')
.map((res: Response) => res.json())
.subscribe((people: Array<Object>) => this.people = people);
http.get('./people.json').subscribe(res => { this.people = res.json(); });
}
}