skirda-go-launcher-interface/src/app/app.component.ts

23 lines
556 B
TypeScript
Raw Normal View History

2022-10-16 14:19:11 +00:00
import { Component } from '@angular/core';
import { GetVersion, GetVersionCallbackDetail } from './services/go';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
})
export class AppComponent {
title = 'go-web';
version: string | null = null;
constructor() {}
getVersion() {
document.addEventListener('GetVersion_Callback', (event: Event): void => {
if (!(event instanceof CustomEvent<string>)) return;
this.version = event.detail;
});
GetVersion();
}
}