app changes
This commit is contained in:
parent
6352b9fc11
commit
47be2e2808
@ -1,9 +1,3 @@
|
||||
<tui-root>
|
||||
Test (version: {{version}})
|
||||
|
||||
<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>
|
||||
<router-outlet></router-outlet>
|
||||
</tui-root>
|
||||
|
@ -7,15 +7,4 @@ import { Component } from '@angular/core';
|
||||
})
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,12 @@
|
||||
import { NgDompurifySanitizer } from "@tinkoff/ng-dompurify";
|
||||
import { TuiRootModule, TuiDialogModule, TuiAlertModule, TUI_SANITIZER } from "@taiga-ui/core";
|
||||
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
|
||||
import {TuiButtonModule} from '@taiga-ui/core';
|
||||
import { NgDompurifySanitizer } from '@tinkoff/ng-dompurify';
|
||||
import {
|
||||
TuiRootModule,
|
||||
TuiDialogModule,
|
||||
TuiAlertModule,
|
||||
TUI_SANITIZER,
|
||||
} from '@taiga-ui/core';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { TuiButtonModule } from '@taiga-ui/core';
|
||||
import {
|
||||
APP_BASE_HREF,
|
||||
LocationStrategy,
|
||||
@ -12,18 +17,34 @@ import { BrowserModule } from '@angular/platform-browser';
|
||||
|
||||
import { AppRoutingModule } from './modules/app-routing.module';
|
||||
import { AppComponent } from './app.component';
|
||||
import { TuiAvatarModule } from "@taiga-ui/kit";
|
||||
import { GamesBarModule } from "./components/games-bar/games-bar.module";
|
||||
|
||||
import { TuiAvatarModule } from '@taiga-ui/kit';
|
||||
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({
|
||||
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: [
|
||||
{ provide: APP_BASE_HREF, useValue: '/' },
|
||||
{ provide: LocationStrategy, useClass: HashLocationStrategy },
|
||||
{provide: TUI_SANITIZER, useClass: NgDompurifySanitizer}
|
||||
],
|
||||
{ provide: TUI_SANITIZER, useClass: NgDompurifySanitizer },
|
||||
],
|
||||
bootstrap: [AppComponent],
|
||||
exports: [],
|
||||
})
|
||||
export class AppModule {}
|
||||
|
@ -1,7 +1,23 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
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({
|
||||
imports: [RouterModule.forRoot(routes)],
|
||||
|
Loading…
Reference in New Issue
Block a user