app.routes.ts 1.8 KB

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