This repository was archived by the owner on Jan 4, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 388
Expand file tree
/
Copy pathroutes.ts
More file actions
46 lines (45 loc) · 1.99 KB
/
routes.ts
File metadata and controls
46 lines (45 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import {Routes} from '@angular/router';
import {
CanActivateComponentSidenav
} from './pages/component-sidenav/component-sidenav-can-load-guard';
export const MATERIAL_DOCS_ROUTES: Routes = [
{
path: '',
pathMatch: 'full',
loadComponent: () => import('./pages/homepage').then(m => m.Homepage)
},
{path: 'categories', redirectTo: '/components/categories'},
{path: 'cdk', pathMatch: 'full', redirectTo: '/cdk/categories'},
{path: 'components', pathMatch: 'full', redirectTo: '/components/categories'},
{
path: 'guides',
loadComponent: () => import('./pages/guide-list').then(m => m.GuideList)
},
// Since https://github.com/angular/components/pull/9574, the cdk-table guide became the overview
// document for the cdk table. To avoid any dead / broken links, we redirect to the new location.
{path: 'guide/cdk-table', redirectTo: '/cdk/table/overview'},
// In v19, the theming system became based on system variables and the mat.theme mixin.
// The following guides were consolidated into the main theming guide, which redirects
// users to v18 docs if they are looking for this content.
{path: 'guide/theming-your-components', redirectTo: '/guide/theming'},
{path: 'guide/typography', redirectTo: '/guide/theming'},
{path: 'guide/customizing-component-styles', redirectTo: '/guide/theming'},
{path: 'guide/elevation', redirectTo: '/guide/theming'},
{path: 'guide/duplicate-theming-styles', redirectTo: '/guide/theming'},
{
path: 'guide/:id',
loadChildren: () => import('./pages/guide-viewer').then(m => m.GuideViewerModule)
},
// Needs to be defined before `:section` so it gets picked first when redirecting a missing page.
{
path: '404',
loadComponent: () => import('./pages/not-found').then(m => m.NotFound)
},
{
path: ':section',
canActivate: [CanActivateComponentSidenav],
loadChildren: () =>
import('./pages/component-sidenav/component-sidenav').then(m => m.ComponentSidenavModule)
},
{path: '**', redirectTo: '/404'},
];