nise/nise-frontend/src/app/app.component.ts

25 lines
493 B
TypeScript
Raw Normal View History

2024-02-14 16:43:11 +00:00
import {Component} from '@angular/core';
import {Router} from "@angular/router";
2024-02-17 19:54:56 +00:00
import {UserService} from "../corelib/service/user.service";
2024-02-14 16:43:11 +00:00
@Component({
selector: 'app-root',
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-14 16:43:11 +00:00
onSubmit(): void {
this.router.navigate(['/u/' + this.term])
.then();
}
}