Angular 6 migration (#132)

* Successfully migrates

* updates environment and package command
This commit is contained in:
Scott
2018-06-11 16:18:58 +10:00
committed by Adrian Gallagher
parent 0dac26c6da
commit 5c28e97c2a
9 changed files with 2196 additions and 1072 deletions

View File

@@ -1,3 +1,5 @@
import {share, map} from 'rxjs/operators';
import { NgModule, Injectable, Optional, SkipSelf } from '@angular/core';
import { Observable, Subject } from 'rxjs/Rx';
import { WebsocketService } from './../../services/websocket/websocket.service';
@@ -16,9 +18,9 @@ export class WebsocketResponseHandlerService {
constructor(@Optional() @SkipSelf() parentModule: WebsocketResponseHandlerService, wsService: WebsocketService) {
this.ws = wsService;
this.messages = <Subject<WebSocketMessage>>this.ws
.connect(WEBSOCKET_URL)
.connect(WEBSOCKET_URL).pipe(
.map((response: MessageEvent): WebSocketMessage => {
map((response: MessageEvent): WebSocketMessage => {
var interval = setInterval(() => {
this.isConnected = this.ws.isConnected;
}, 2000);
@@ -34,9 +36,9 @@ export class WebsocketResponseHandlerService {
responseMessage.error = websocketResponseMessage.error;
return responseMessage;
});
}));
this.isConnected = this.ws.isConnected;
this.shared = this.messages.share(); //multicast
this.shared = this.messages.pipe(share()); //multicast
}
}

View File

@@ -0,0 +1,4 @@
export const CONF_PROD = {
production: true,
environment: 'PROD'
};

View File

@@ -11,7 +11,8 @@
]
},
"files": [
"test.ts"
"test.ts",
"polyfills.ts"
],
"include": [
"**/*.spec.ts",