77 */
88
99import { Routes } from '@angular/router' ;
10+ import { ExternalRedirectResolver } from './external-redirect-resolver' ;
1011import { CanActivateComponentSidenav } from './pages/component-sidenav/component-sidenav-can-load-guard' ;
1112
1213export const MATERIAL_DOCS_ROUTES : Routes = [
@@ -25,6 +26,55 @@ export const MATERIAL_DOCS_ROUTES: Routes = [
2526 // Since https://github.com/angular/components/pull/9574, the cdk-table guide became the overview
2627 // document for the cdk table. To avoid any dead / broken links, we redirect to the new location.
2728 { path : 'guide/cdk-table' , redirectTo : '/cdk/table/overview' } ,
29+ // Component harness, drag & drop docs have moved to angular.dev
30+ {
31+ path : 'cdk/testing' ,
32+ // We need to load some component, but really we just want to stay on the current page while we
33+ // wait for the external redirect.
34+ loadComponent : ( ) => new Promise ( ( ) => { } ) as any ,
35+ data : { 'external-redirect' : 'https://angular.dev/guide/testing/component-harnesses-overview' } ,
36+ resolve : { reddirect : ExternalRedirectResolver } ,
37+ } ,
38+ {
39+ path : 'cdk/testing/api' ,
40+ // We need to load some component, but really we just want to stay on the current page while we
41+ // wait for the external redirect.
42+ loadComponent : ( ) => new Promise ( ( ) => { } ) as any ,
43+ data : { 'external-redirect' : 'https://angular.dev/api#angular_cdk_testing' } ,
44+ resolve : { reddirect : ExternalRedirectResolver } ,
45+ } ,
46+ {
47+ path : 'cdk/testing/:tab' ,
48+ // We need to load some component, but really we just want to stay on the current page while we
49+ // wait for the external redirect.
50+ loadComponent : ( ) => new Promise ( ( ) => { } ) as any ,
51+ data : { 'external-redirect' : 'https://angular.dev/guide/testing/component-harnesses-overview' } ,
52+ resolve : { reddirect : ExternalRedirectResolver } ,
53+ } ,
54+ {
55+ path : 'cdk/drag-drop' ,
56+ // We need to load some component, but really we just want to stay on the current page while we
57+ // wait for the external redirect.
58+ loadComponent : ( ) => new Promise ( ( ) => { } ) as any ,
59+ data : { 'external-redirect' : 'https://angular.dev/guide/drag-drop' } ,
60+ resolve : { reddirect : ExternalRedirectResolver } ,
61+ } ,
62+ {
63+ path : 'cdk/drag-drop/api' ,
64+ // We need to load some component, but really we just want to stay on the current page while we
65+ // wait for the external redirect.
66+ loadComponent : ( ) => new Promise ( ( ) => { } ) as any ,
67+ data : { 'external-redirect' : 'https://angular.dev/api#angular_cdk_drag-drop' } ,
68+ resolve : { reddirect : ExternalRedirectResolver } ,
69+ } ,
70+ {
71+ path : 'cdk/drag-drop/:tab' ,
72+ // We need to load some component, but really we just want to stay on the current page while we
73+ // wait for the external redirect.
74+ loadComponent : ( ) => new Promise ( ( ) => { } ) as any ,
75+ data : { 'external-redirect' : 'https://angular.dev/guide/drag-drop' } ,
76+ resolve : { reddirect : ExternalRedirectResolver } ,
77+ } ,
2878 // In v19, the theming system became based on system variables and the mat.theme mixin.
2979 // The following guides were consolidated into the main theming guide, which redirects
3080 // users to v18 docs if they are looking for this content.
0 commit comments