mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-01-16 22:11:57 +00:00
20 lines
458 B
TypeScript
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();
|
|
}
|
|
}
|