redirect / to /hotels

This commit is contained in:
Constantin Simonis 2025-01-28 08:15:37 +01:00
parent 65bdfdd28b
commit 9a45f5099a
Signed by: csimonis
GPG Key ID: 758DD9C506603183

View File

@ -1,6 +1,6 @@
import {Component, OnInit} from '@angular/core'; import {Component, inject, OnInit} from '@angular/core';
import {filter, from, map, reduce} from "rxjs"; import {filter, from, map, reduce} from "rxjs";
import {RouterOutlet} from "@angular/router"; import {Router, RouterOutlet} from "@angular/router";
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
@ -13,7 +13,11 @@ import {RouterOutlet} from "@angular/router";
` `
}) })
export class AppComponent implements OnInit { export class AppComponent implements OnInit {
router: Router = inject(Router);
ngOnInit() { ngOnInit() {
this.router.navigate(['hotels']);
const users = [ const users = [
{ {
name: 'John', name: 'John',