diff --git a/modules/@angular/http/src/http.ts b/modules/@angular/http/src/http.ts index 5dad25283c..61782119ff 100644 --- a/modules/@angular/http/src/http.ts +++ b/modules/@angular/http/src/http.ts @@ -43,6 +43,7 @@ function mergeOptions(defaultOpts: BaseRequestOptions, providedOpts: RequestOpti * * ```typescript * import {Http, HTTP_PROVIDERS} from '@angular/http'; + * import 'rxjs/add/operator/map' * @Component({ * selector: 'http-app', * viewProviders: [HTTP_PROVIDERS], @@ -64,7 +65,7 @@ function mergeOptions(defaultOpts: BaseRequestOptions, providedOpts: RequestOpti * ### Example * * ``` - * http.get('people.json').observer({next: (value) => this.people = value}); + * http.get('people.json').subscribe((res:Response) => this.people = res.json()); * ``` * * The default construct used to perform requests, `XMLHttpRequest`, is abstracted as a "Backend" (