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

24 lines
385 B
TypeScript
Raw Normal View History

2024-02-14 16:43:11 +00:00
import {Component} from '@angular/core';
import {Router} from "@angular/router";
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
term: string = '';
constructor(private router: Router) {
}
onSubmit(): void {
this.router.navigate(['/u/' + this.term])
.then();
}
}