frontend-tutorial-framework/src/app/app.component.ts
2017-12-18 17:52:10 +01:00

20 lines
458 B
TypeScript

import { Component, OnInit } from '@angular/core';
import { WebSocketService } from './websocket.service';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
title = 'app';
constructor(private webSocketService: WebSocketService) {
this.webSocketService = webSocketService;
}
ngOnInit() {
this.webSocketService.connect();
}
}