2017-12-18 16:52:10 +00:00
|
|
|
import { Component, OnInit } from '@angular/core';
|
|
|
|
import { WebSocketService } from './websocket.service';
|
2017-12-14 10:03:30 +00:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'app-root',
|
|
|
|
templateUrl: './app.component.html',
|
2017-12-18 16:52:10 +00:00
|
|
|
styleUrls: ['./app.component.scss']
|
2017-12-14 10:03:30 +00:00
|
|
|
})
|
2017-12-18 16:52:10 +00:00
|
|
|
export class AppComponent implements OnInit {
|
2017-12-14 10:03:30 +00:00
|
|
|
title = 'app';
|
2017-12-18 16:52:10 +00:00
|
|
|
|
2018-01-26 14:24:40 +00:00
|
|
|
constructor(private webSocketService: WebSocketService) {}
|
2017-12-18 16:52:10 +00:00
|
|
|
|
|
|
|
ngOnInit() {
|
|
|
|
this.webSocketService.connect();
|
2018-01-11 15:12:54 +00:00
|
|
|
this.webSocketService.send('reset', '');
|
2017-12-18 16:52:10 +00:00
|
|
|
}
|
2017-12-14 10:03:30 +00:00
|
|
|
}
|