app changes
This commit is contained in:
parent
6352b9fc11
commit
47be2e2808
@ -1,9 +1,3 @@
|
|||||||
<tui-root>
|
<tui-root>
|
||||||
Test (version: {{version}})
|
<router-outlet></router-outlet>
|
||||||
|
</tui-root>
|
||||||
<button (click)="getVersion()">Get version</button>
|
|
||||||
<app-games-bar></app-games-bar>
|
|
||||||
<!-- <button (click)="RunGame()">Launch Open Arena</button> -->
|
|
||||||
<!-- <button (click)="launchGame2()">Launch Garry's Mod</button> -->
|
|
||||||
|
|
||||||
</tui-root>
|
|
||||||
|
@ -7,15 +7,4 @@ import { Component } from '@angular/core';
|
|||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
title = 'go-web';
|
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
import { NgDompurifySanitizer } from "@tinkoff/ng-dompurify";
|
import { NgDompurifySanitizer } from '@tinkoff/ng-dompurify';
|
||||||
import { TuiRootModule, TuiDialogModule, TuiAlertModule, TUI_SANITIZER } from "@taiga-ui/core";
|
import {
|
||||||
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
|
TuiRootModule,
|
||||||
import {TuiButtonModule} from '@taiga-ui/core';
|
TuiDialogModule,
|
||||||
|
TuiAlertModule,
|
||||||
|
TUI_SANITIZER,
|
||||||
|
} from '@taiga-ui/core';
|
||||||
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
|
import { TuiButtonModule } from '@taiga-ui/core';
|
||||||
import {
|
import {
|
||||||
APP_BASE_HREF,
|
APP_BASE_HREF,
|
||||||
LocationStrategy,
|
LocationStrategy,
|
||||||
@ -12,18 +17,34 @@ import { BrowserModule } from '@angular/platform-browser';
|
|||||||
|
|
||||||
import { AppRoutingModule } from './modules/app-routing.module';
|
import { AppRoutingModule } from './modules/app-routing.module';
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { TuiAvatarModule } from "@taiga-ui/kit";
|
import { TuiAvatarModule } from '@taiga-ui/kit';
|
||||||
import { GamesBarModule } from "./components/games-bar/games-bar.module";
|
import { GamesBarModule } from './components/games-bar/games-bar.module';
|
||||||
|
import { MainModule } from './components/main/main.module';
|
||||||
|
import { PlaygroundModule } from './components/playground/playground.module';
|
||||||
|
import { SandboxModule } from './components/sandbox/sandbox.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [AppComponent],
|
declarations: [AppComponent],
|
||||||
imports: [BrowserModule, AppRoutingModule, BrowserAnimationsModule, TuiRootModule, TuiDialogModule, TuiAlertModule, TuiButtonModule, TuiAvatarModule, GamesBarModule],
|
imports: [
|
||||||
|
BrowserModule,
|
||||||
|
AppRoutingModule,
|
||||||
|
BrowserAnimationsModule,
|
||||||
|
TuiRootModule,
|
||||||
|
TuiDialogModule,
|
||||||
|
TuiAlertModule,
|
||||||
|
TuiButtonModule,
|
||||||
|
TuiAvatarModule,
|
||||||
|
GamesBarModule,
|
||||||
|
MainModule,
|
||||||
|
PlaygroundModule,
|
||||||
|
SandboxModule,
|
||||||
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: APP_BASE_HREF, useValue: '/' },
|
{ provide: APP_BASE_HREF, useValue: '/' },
|
||||||
{ provide: LocationStrategy, useClass: HashLocationStrategy },
|
{ provide: LocationStrategy, useClass: HashLocationStrategy },
|
||||||
{provide: TUI_SANITIZER, useClass: NgDompurifySanitizer}
|
{ provide: TUI_SANITIZER, useClass: NgDompurifySanitizer },
|
||||||
],
|
],
|
||||||
bootstrap: [AppComponent],
|
bootstrap: [AppComponent],
|
||||||
|
exports: [],
|
||||||
})
|
})
|
||||||
export class AppModule {}
|
export class AppModule {}
|
||||||
|
@ -1,7 +1,23 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { RouterModule, Routes } from '@angular/router';
|
import { RouterModule, Routes } from '@angular/router';
|
||||||
|
import { MainRootComponent } from '../components/main/main-root/main-root.component';
|
||||||
|
import { PlaygroundComponent } from '../components/playground/playground.component';
|
||||||
|
import { SandboxComponent } from '../components/sandbox/sandbox.component';
|
||||||
|
|
||||||
const routes: Routes = [];
|
const routes: Routes = [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: PlaygroundComponent,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'main',
|
||||||
|
component: MainRootComponent,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'sandbox',
|
||||||
|
component: SandboxComponent,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [RouterModule.forRoot(routes)],
|
imports: [RouterModule.forRoot(routes)],
|
||||||
|
Loading…
Reference in New Issue
Block a user