frontend-tutorial-framework/src/app/app.component.ts

20 lines
458 B
TypeScript
Raw Normal View History

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