admin.routes.ts 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import { Routes } from '@angular/router';
  2. import { adminGuard } from './admin.guard';
  3. export const adminRoutes: Routes = [
  4. {
  5. path: 'admin/login',
  6. loadComponent: () => import('./pages/admin-login.component').then((module) => module.AdminLoginComponent),
  7. },
  8. {
  9. path: 'admin',
  10. canActivate: [adminGuard],
  11. loadComponent: () => import('./layout/admin-shell.component').then((module) => module.AdminShellComponent),
  12. children: [
  13. { path: '', pathMatch: 'full', redirectTo: 'dashboard' },
  14. {
  15. path: 'dashboard',
  16. loadComponent: () => import('./pages/admin-dashboard.component').then((module) => module.AdminDashboardComponent),
  17. },
  18. {
  19. path: 'api-catalog',
  20. loadComponent: () => import('./pages/admin-api-catalog.component').then((module) => module.AdminApiCatalogComponent),
  21. },
  22. {
  23. path: 'icon-catalog',
  24. loadComponent: () => import('./pages/admin-icon-catalog.component').then((module) => module.AdminIconCatalogComponent),
  25. },
  26. {
  27. path: 'boot-layout',
  28. loadComponent: () => import('./pages/admin-boot-layout.component').then((module) => module.AdminBootLayoutComponent),
  29. },
  30. {
  31. path: 'resources',
  32. loadComponent: () => import('./pages/admin-resource-catalog.component').then((module) => module.AdminResourceCatalogComponent),
  33. },
  34. {
  35. path: 'resources/:className',
  36. loadComponent: () => import('./pages/admin-resource.component').then((module) => module.AdminResourceComponent),
  37. },
  38. {
  39. path: 'migration',
  40. loadComponent: () => import('./pages/admin-migration.component').then((module) => module.AdminMigrationComponent),
  41. },
  42. ],
  43. },
  44. ];