File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
modules/angular2/src/http/backends Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -131,15 +131,16 @@ export class MockBackend implements ConnectionBackend {
131131 * ### Example
132132 *
133133 * ```
134- * import {MockBackend, Http, BaseRequestOptions} from 'angular2/http';
134+ * import {Http, BaseRequestOptions} from 'angular2/http';
135+ * import {MockBackend} from 'angular2/http/testing';
135136 * import {Injector} from 'angular2/core';
136137 *
137138 * it('should get a response', () => {
138139 * var connection; //this will be set when a new connection is emitted from the backend.
139140 * var text; //this will be set from mock response
140141 * var injector = Injector.resolveAndCreate([
141142 * MockBackend,
142- * provide(Http, {useFactory: (backend, options) {
143+ * provide(Http, {useFactory: (backend, options) => {
143144 * return new Http(backend, options);
144145 * }, deps: [MockBackend, BaseRequestOptions]}]);
145146 * var backend = injector.get(MockBackend);
You can’t perform that action at this time.
0 commit comments