From e42d8311383f0f38ba7a9d5d9e3fed7bdf142fb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Fri, 16 Feb 2018 12:12:01 +0100 Subject: [PATCH] Add connecting WebSocketService to each component --- src/app/messages/messages.component.ts | 1 + src/app/webide/webide.component.ts | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/messages/messages.component.ts b/src/app/messages/messages.component.ts index b164f9e..38301f0 100644 --- a/src/app/messages/messages.component.ts +++ b/src/app/messages/messages.component.ts @@ -21,6 +21,7 @@ export class MessagesComponent implements OnInit { } ngOnInit() { + this.websocketService.connect(); this.websocketService.observeAnchor('message').subscribe( (event) => { this.messages.push(event.data); diff --git a/src/app/webide/webide.component.ts b/src/app/webide/webide.component.ts index d0f8670..e6e25fd 100644 --- a/src/app/webide/webide.component.ts +++ b/src/app/webide/webide.component.ts @@ -42,7 +42,6 @@ export class WebideComponent implements OnInit { ngOnInit() { this.webSocketService.connect(); - this.webSocketService.send('reset', ''); this.subscribeWS(); this.requestCode(); }