@ -16,7 +16,7 @@
|
||||
"tslib": "^1.9.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"rxjs": "^5.5.0",
|
||||
"rxjs": "^6.0.0-alpha.3",
|
||||
"@angular/core": "0.0.0-PLACEHOLDER",
|
||||
"@angular/platform-browser": "0.0.0-PLACEHOLDER"
|
||||
},
|
||||
|
@ -13,9 +13,7 @@ const globals = {
|
||||
'@angular/core': 'ng.core',
|
||||
'@angular/compiler': 'ng.compiler',
|
||||
'@angular/platform-browser': 'ng.platformBrowser',
|
||||
'rxjs/Observable': 'Rx',
|
||||
'rxjs/Observer': 'Rx',
|
||||
'rxjs/Subject': 'Rx'
|
||||
'rxjs': 'rxjs'
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
|
@ -7,8 +7,7 @@
|
||||
*/
|
||||
|
||||
import {Injectable} from '@angular/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {Observer} from 'rxjs/Observer';
|
||||
import {Observable, Observer} from 'rxjs';
|
||||
|
||||
import {ResponseOptions} from '../base_response_options';
|
||||
import {ReadyState, RequestMethod, ResponseType} from '../enums';
|
||||
|
@ -8,8 +8,7 @@
|
||||
|
||||
import {Injectable} from '@angular/core';
|
||||
import {ɵgetDOM as getDOM} from '@angular/platform-browser';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {Observer} from 'rxjs/Observer';
|
||||
import {Observable, Observer} from 'rxjs';
|
||||
import {ResponseOptions} from '../base_response_options';
|
||||
import {ContentType, ReadyState, RequestMethod, ResponseContentType, ResponseType} from '../enums';
|
||||
import {Headers} from '../headers';
|
||||
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
import {Injectable} from '@angular/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {Observable} from 'rxjs';
|
||||
|
||||
import {BaseRequestOptions, RequestOptions} from './base_request_options';
|
||||
import {RequestMethod} from './enums';
|
||||
@ -51,7 +51,8 @@ function mergeOptions(
|
||||
*
|
||||
* ```typescript
|
||||
* import {Http, HTTP_PROVIDERS} from '@angular/http';
|
||||
* import 'rxjs/add/operator/map'
|
||||
* import {map} from 'rxjs/operators';
|
||||
*
|
||||
* @Component({
|
||||
* selector: 'http-app',
|
||||
* viewProviders: [HTTP_PROVIDERS],
|
||||
@ -61,7 +62,7 @@ function mergeOptions(
|
||||
* constructor(http: Http) {
|
||||
* http.get('people.json')
|
||||
* // Call map on the response observable to get the parsed people object
|
||||
* .map(res => res.json())
|
||||
* .pipe(map(res => res.json()))
|
||||
* // Subscribe to the observable to get the parsed people object and attach it to the
|
||||
* // component
|
||||
* .subscribe(people => this.people = people);
|
||||
|
@ -14,7 +14,7 @@ import {Request} from '@angular/http/src/static_request';
|
||||
import {Response} from '@angular/http/src/static_response';
|
||||
import {MockBackend, MockConnection} from '@angular/http/testing/src/mock_backend';
|
||||
import {expect} from '@angular/platform-browser/testing/src/matchers';
|
||||
import {ReplaySubject} from 'rxjs/ReplaySubject';
|
||||
import {ReplaySubject} from 'rxjs';
|
||||
|
||||
{
|
||||
describe('MockBackend', () => {
|
||||
|
@ -11,8 +11,7 @@ import {TestBed, getTestBed} from '@angular/core/testing';
|
||||
import {AsyncTestCompleter, afterEach, beforeEach, describe, inject, it} from '@angular/core/testing/src/testing_internal';
|
||||
import {stringToArrayBuffer} from '@angular/http/src/http_utils';
|
||||
import {expect} from '@angular/platform-browser/testing/src/matchers';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {zip} from 'rxjs/observable/zip';
|
||||
import {Observable, zip} from 'rxjs';
|
||||
|
||||
import {BaseRequestOptions, ConnectionBackend, Http, HttpModule, JSONPBackend, Jsonp, JsonpModule, Request, RequestMethod, RequestOptions, Response, ResponseContentType, ResponseOptions, URLSearchParams, XHRBackend} from '../index';
|
||||
import {MockBackend, MockConnection} from '../testing/src/mock_backend';
|
||||
|
@ -14,10 +14,8 @@ const globals = {
|
||||
'@angular/compiler': 'ng.compiler',
|
||||
'@angular/platform-browser': 'ng.platformBrowser',
|
||||
'@angular/http': 'ng.http',
|
||||
'rxjs/Observable': 'Rx',
|
||||
'rxjs/ReplaySubject': 'Rx',
|
||||
'rxjs/Subject': 'Rx',
|
||||
'rxjs/operator/take': 'Rx.Observable.prototype'
|
||||
'rxjs': 'rxjs',
|
||||
'rxjs/operators': 'rxjs.operators',
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
|
@ -8,9 +8,8 @@
|
||||
|
||||
import {Injectable} from '@angular/core';
|
||||
import {Connection, ConnectionBackend, ReadyState, Request, Response} from '@angular/http';
|
||||
import {ReplaySubject} from 'rxjs/ReplaySubject';
|
||||
import {Subject} from 'rxjs/Subject';
|
||||
import {take} from 'rxjs/operator/take';
|
||||
import {ReplaySubject, Subject} from 'rxjs';
|
||||
import {take} from 'rxjs/operators';
|
||||
|
||||
|
||||
/**
|
||||
@ -40,7 +39,7 @@ export class MockConnection implements Connection {
|
||||
response: ReplaySubject<Response>;
|
||||
|
||||
constructor(req: Request) {
|
||||
this.response = <any>take.call(new ReplaySubject(1), 1);
|
||||
this.response = <any>new ReplaySubject(1).pipe(take(1));
|
||||
this.readyState = ReadyState.Open;
|
||||
this.request = req;
|
||||
}
|
||||
|
Reference in New Issue
Block a user