Przekazanie angular

constructor(private router: Router) { }

onSubmit() {
  // some stuff
  this.router.navigate(['/search']);
}
DevPedrada