feat(Http): add Http class

Fixes #2530
This commit is contained in:
Jeff Cross
2015-06-13 15:49:05 -07:00
parent 93596dff3f
commit b68e561c0f
8 changed files with 266 additions and 55 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import {bootstrap, Component, View, NgFor, NgIf, Inject} from 'angular2/angular2';
import {httpInjectables} from 'angular2/http';
import {Http} from 'angular2/src/http/http';
import {HttpFactory} from 'angular2/src/http/http';
import {IHttp} from 'angular2/src/http/interfaces';
import {Response} from 'angular2/src/http/static_response';
import {LocalVariable} from './assign_local_directive';
@@ -24,7 +24,7 @@ import {LocalVariable} from './assign_local_directive';
})
export class HttpCmp {
people: Rx.Observable<Object>;
constructor(@Inject(Http) http: IHttp) {
constructor(@Inject(HttpFactory) http: IHttp) {
this.people = http('./people.json').map(res => res.json());
}
}