Skip to content

Commit e6170e8

Browse files
cexbrayatjelbourn
authored andcommitted
docs(http): fix MockBackend imports
Fixes angular#5639 Closes angular#5651
1 parent 4b1618c commit e6170e8

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

modules/angular2/http.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ export {URLSearchParams} from './src/http/url_search_params';
116116
*
117117
* ```
118118
* import {provide, Injector} from 'angular2/angular2';
119-
* import {HTTP_PROVIDERS, Http, Response, XHRBackend, MockBackend} from 'angular2/http';
119+
* import {HTTP_PROVIDERS, Http, Response, XHRBackend} from 'angular2/http';
120+
* import {MockBackend} from 'angular2/http/testing';
120121
*
121122
* var people = [{name: 'Jeff'}, {name: 'Tobias'}];
122123
*
@@ -239,7 +240,8 @@ export const HTTP_BINDINGS = HTTP_PROVIDERS;
239240
*
240241
* ```
241242
* import {provide, Injector} from 'angular2/angular2';
242-
* import {JSONP_PROVIDERS, Jsonp, Response, JSONPBackend, MockBackend} from 'angular2/http';
243+
* import {JSONP_PROVIDERS, Jsonp, Response, JSONPBackend} from 'angular2/http';
244+
* import {MockBackend} from 'angular2/http/testing';
243245
*
244246
* var people = [{name: 'Jeff'}, {name: 'Tobias'}];
245247
* var injector = Injector.resolveAndCreate([

modules/angular2/src/http/backends/mock_backend.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ export class MockConnection implements Connection {
9898
* ### Example
9999
*
100100
* ```
101-
* import {MockBackend, DefaultOptions, Http} from 'angular2/http';
101+
* import {DefaultOptions, Http} from 'angular2/http';
102+
* import {MockBackend} from 'angular2/http/testing';
102103
* it('should get some data', inject([AsyncTestCompleter], (async) => {
103104
* var connection;
104105
* var injector = Injector.resolveAndCreate([

modules/angular2/src/http/http.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ function mergeOptions(defaultOpts, providedOpts, method, url): RequestOptions {
7373
* ### Example
7474
*
7575
* ```typescript
76-
* import {MockBackend, BaseRequestOptions, Http} from 'angular2/http';
76+
* import {BaseRequestOptions, Http} from 'angular2/http';
77+
* import {MockBackend} from 'angular2/http/testing';
7778
* var injector = Injector.resolveAndCreate([
7879
* BaseRequestOptions,
7980
* MockBackend,

0 commit comments

Comments
 (0)