2024-02-14 16:43:11 +00:00
|
|
|
import {Component} from '@angular/core';
|
2024-02-23 10:44:44 +00:00
|
|
|
import {Router, RouterLink, RouterOutlet} from "@angular/router";
|
2024-02-17 19:54:56 +00:00
|
|
|
import {UserService} from "../corelib/service/user.service";
|
2024-02-23 10:44:44 +00:00
|
|
|
import {NgIf} from '@angular/common';
|
|
|
|
|
import {FormsModule} from '@angular/forms';
|
2024-02-29 02:02:14 +00:00
|
|
|
import {ReplayViewerComponent} from "../corelib/components/replay-viewer/replay-viewer.component";
|
2024-02-14 16:43:11 +00:00
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'app-root',
|
2024-02-23 10:44:44 +00:00
|
|
|
standalone: true,
|
|
|
|
|
imports: [
|
|
|
|
|
RouterLink,
|
|
|
|
|
FormsModule,
|
2024-02-29 02:02:14 +00:00
|
|
|
NgIf, RouterOutlet, ReplayViewerComponent
|
2024-02-23 10:44:44 +00:00
|
|
|
],
|
2024-02-14 16:43:11 +00:00
|
|
|
templateUrl: './app.component.html',
|
|
|
|
|
styleUrls: ['./app.component.css']
|
|
|
|
|
})
|
|
|
|
|
export class AppComponent {
|
|
|
|
|
|
|
|
|
|
term: string = '';
|
|
|
|
|
|
2024-02-17 19:54:56 +00:00
|
|
|
constructor(private router: Router,
|
|
|
|
|
public userService: UserService
|
2024-02-23 10:44:44 +00:00
|
|
|
) {
|
|
|
|
|
}
|
2024-02-14 16:43:11 +00:00
|
|
|
|
|
|
|
|
onSubmit(): void {
|
|
|
|
|
this.router.navigate(['/u/' + this.term])
|
|
|
|
|
.then();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|