Redirect first-time visitors to info page

Updated routing to use MainPage as the default route and added logic in App component to redirect users to the /info page on their first visit using sessionStorage.
This commit is contained in:
2025-10-26 00:40:14 +02:00
parent e9f25fe66a
commit 7ffec411ad
2 changed files with 17 additions and 3 deletions

View File

@@ -2,9 +2,11 @@ import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { PocModelComponent } from './poc-model-component/poc-model-component';
import { HomeComponent } from './home-component/home-component';
import { MainPage } from './main-page/main-page';
const routes: Routes = [
{ path: '', component: HomeComponent, pathMatch: 'full' },
{ path: '', component: MainPage, pathMatch: 'full' },
{ path: 'info', component: HomeComponent },
{ path: 'poc-model', component: PocModelComponent },
{ path: '**', component: HomeComponent },
];