From aec95015f89b95f8e583afef7a143a963b063cf8 Mon Sep 17 00:00:00 2001 From: Rob Wormald Date: Wed, 16 Dec 2015 00:32:25 -0800 Subject: [PATCH] docs(http): update http docs to mention .map operator Closes #5947 --- modules/@angular/http/src/http.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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" (