WIP
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import { Routes } from '@angular/router';
|
||||
import { DashboardComponent } from './portals/user-portal/pages/dashboard/dashboard.component';
|
||||
import { LoginPage } from './features/login-page/login-page';
|
||||
import { UserPortalComponent } from './portals/user-portal/user-portal.component';
|
||||
import { AuthGuard } from './core/guards/auth.guard';
|
||||
|
||||
export const routes: Routes = [
|
||||
// Public routes
|
||||
{ path: 'login', component: LoginPage },
|
||||
|
||||
// Keep the startup surface intentionally small: login + guarded mock dashboard.
|
||||
{
|
||||
path: 'user-portal',
|
||||
component: UserPortalComponent,
|
||||
canActivate: [AuthGuard],
|
||||
children: [
|
||||
{ path: '', redirectTo: 'dashboard', pathMatch: 'full' },
|
||||
{ path: 'dashboard', component: DashboardComponent }
|
||||
]
|
||||
},
|
||||
|
||||
{ path: '', redirectTo: 'login', pathMatch: 'full' },
|
||||
{ path: 'dashboard', redirectTo: 'user-portal/dashboard' },
|
||||
|
||||
// Catch all route - redirect to login
|
||||
{ path: '**', redirectTo: 'login' }
|
||||
];
|
||||
Reference in New Issue
Block a user