This commit is contained in:
Tizian.Breuch
2025-09-17 13:02:27 +02:00
parent 7e5939868b
commit a7d0f44d20
18 changed files with 929 additions and 149 deletions

View File

@@ -3,15 +3,30 @@ import { Routes } from '@angular/router';
import { AccessDeniedComponent } from './core/components/access-denied/access-denied.component';
import { NotFoundComponent } from './core/components/not-found/not-found.component';
import { DefaultLayoutComponent } from './core/components/default-layout/default-layout.component';
import { DashboardPageComponent } from './features/dashboard/pages/dashboard-page/dashboard-page.component';
export const routes: Routes = [
// Regel 1: Leerer Pfad (Startseite der Anwendung)
// Ein Benutzer, der die Haupt-URL Ihrer Seite aufruft (z.B. "http://localhost:4200/"),
// wird sofort und ohne Umwege zur Login-Seite weitergeleitet.
{
path: '',
redirectTo: 'auth',
pathMatch: 'full',
},
{
path: 'dashboard',
component: DefaultLayoutComponent,
children: [
{
path: '',
loadChildren: () =>
import('./features/dashboard/dashboard.routes').then(
(r) => r.DASHBOARD_ROUTES
),
},
],
},
{
path: 'auth',
loadChildren: () =>
@@ -28,8 +43,13 @@ export const routes: Routes = [
title: 'Zugriff verweigert',
},
{
path: '**',
path: '404',
component: NotFoundComponent,
title: '404 - Seite nicht gefunden',
},
{
path: '**',
redirectTo: '404',
},
];