mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-07-01 11:06:23 +00:00
Extract demo page to 'dashboard' component
This commit is contained in:
18
src/app/dashboard/dashboard.component.ts
Normal file
18
src/app/dashboard/dashboard.component.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { WebSocketService } from '../websocket.service';
|
||||
import { FSMUpdateService } from '../fsmupdate.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-dashboard',
|
||||
templateUrl: './dashboard.component.html',
|
||||
styleUrls: ['./dashboard.component.scss']
|
||||
})
|
||||
export class DashboardComponent implements OnInit {
|
||||
constructor(private webSocketService: WebSocketService, private fsmUpdateService: FSMUpdateService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.webSocketService.connect();
|
||||
this.webSocketService.send('reset', '');
|
||||
this.fsmUpdateService.init();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user