init
This commit is contained in:
@@ -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',
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user