25 lines
493 B
TypeScript
25 lines
493 B
TypeScript
import {Component} from '@angular/core';
|
|
import {Router} from "@angular/router";
|
|
import {UserService} from "../corelib/service/user.service";
|
|
|
|
|
|
@Component({
|
|
selector: 'app-root',
|
|
templateUrl: './app.component.html',
|
|
styleUrls: ['./app.component.css']
|
|
})
|
|
export class AppComponent {
|
|
|
|
term: string = '';
|
|
|
|
constructor(private router: Router,
|
|
public userService: UserService
|
|
) { }
|
|
|
|
onSubmit(): void {
|
|
this.router.navigate(['/u/' + this.term])
|
|
.then();
|
|
}
|
|
|
|
}
|