app.routes.ts 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import { Route } from '@angular/router';
  2. import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
  3. import { AppShellComponent, AuthGuard } from '@vendure/admin-ui/core';
  4. export const routes: Route[] = [
  5. { path: 'login', loadChildren: () => import('@vendure/admin-ui/login').then(m => m.LoginModule) },
  6. {
  7. path: '',
  8. canActivate: [AuthGuard],
  9. component: AppShellComponent,
  10. data: {
  11. breadcrumb: _('breadcrumb.dashboard'),
  12. },
  13. children: [
  14. {
  15. path: '',
  16. pathMatch: 'full',
  17. loadChildren: () => import('@vendure/admin-ui/dashboard').then(m => m.DashboardModule),
  18. },
  19. {
  20. path: 'catalog',
  21. loadChildren: () => import('@vendure/admin-ui/catalog').then(m => m.CatalogModule),
  22. },
  23. {
  24. path: 'customer',
  25. loadChildren: () => import('@vendure/admin-ui/customer').then(m => m.CustomerModule),
  26. },
  27. {
  28. path: 'orders',
  29. loadChildren: () => import('@vendure/admin-ui/order').then(m => m.OrderModule),
  30. },
  31. {
  32. path: 'marketing',
  33. loadChildren: () => import('@vendure/admin-ui/marketing').then(m => m.MarketingModule),
  34. },
  35. {
  36. path: 'settings',
  37. loadChildren: () => import('@vendure/admin-ui/settings').then(m => m.SettingsModule),
  38. },
  39. {
  40. path: 'system',
  41. loadChildren: () => import('@vendure/admin-ui/system').then(m => m.SystemModule),
  42. },
  43. ],
  44. },
  45. ];