1 import http and Inject
import {httpInjectables, Http} from 'angular2/http';
import {Inject} from 'angular2/di';
2 init your Http and use it
class App {
http:Http;
status:int;
constructor(@Inject(Http) http) {
this.http = http;
this.http.get('test.json').toRx().subscribe((res:Response) => {
this.status = res.status;
});
}
}
3 show the result in the UI
{{status}}