Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit 549c196

Browse files
authored
docs: Add missing @use imports to guides (#2079)
closes #2076
1 parent 95ba220 commit 549c196

File tree

24 files changed

+93
-85
lines changed

24 files changed

+93
-85
lines changed

demos/src/app/app-routing.module.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const routes: Routes = [
5555
import('./components/linear-progress/module').then(m => m.LinearProgressModule)
5656
},
5757
{path: 'list-demo', loadChildren: () => import('./components/list-demo/list.module').then(m => m.ListModule)},
58-
{path: 'menu-demo', loadChildren: () => import('./components/menu-demo/menu.module').then(m => m.MenuModule)},
58+
{path: 'menu-demo', loadChildren: () => import('./components/menu/module').then(m => m.MenuModule)},
5959
{
6060
path: 'menu-surface-demo', loadChildren: () =>
6161
import('./components/menu-surface/module').then(m => m.MenuSurfaceModule)
@@ -73,11 +73,11 @@ const routes: Routes = [
7373
{path: 'tabs-demo', loadChildren: () => import('./components/tabs-demo/tabs.module').then(m => m.TabsModule)},
7474
{
7575
path: 'text-field-demo', loadChildren: () =>
76-
import('./components/text-field-demo/text-field.module').then(m => m.TextFieldModule)
76+
import('./components/text-field/module').then(m => m.TextFieldModule)
7777
},
7878
{
7979
path: 'top-app-bar-demo', loadChildren: () =>
80-
import('./components/top-app-bar-demo/top-app-bar.module').then(m => m.TopAppBarModule)
80+
import('./components/top-app-bar/module').then(m => m.TopAppBarModule)
8181
},
8282
{
8383
path: 'typography-demo', loadChildren: () =>

demos/src/app/components/menu-demo/menu.module.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

demos/src/app/components/menu-demo/routing.module.ts

Lines changed: 0 additions & 29 deletions
This file was deleted.

demos/src/app/components/menu-demo/menu-demo.ts renamed to demos/src/app/components/menu/menu.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {MdcListItem} from '@angular-mdc/web';
44
import {ComponentViewer} from '../../shared/component-viewer';
55

66
@Component({template: '<component-viewer></component-viewer>'})
7-
export class MenuDemo implements OnInit {
7+
export class Menu implements OnInit {
88
@ViewChild(ComponentViewer, {static: true}) _componentViewer: ComponentViewer;
99

1010
ngOnInit(): void {
@@ -20,7 +20,9 @@ export class MenuDemo implements OnInit {
2020
}],
2121
code: `import {MdcMenuModule} from '@angular-mdc/web';`,
2222
sass: `@use '@material/menu/mdc-menu';
23-
@use '@material/menu';`
23+
@use '@material/menu';
24+
@use '@material/list/mdc-list';
25+
@use '@material/menu-surface/mdc-menu-surface';`
2426
};
2527
}
2628
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import {NgModule} from '@angular/core';
2+
3+
import {SharedModule} from '../../shared.module';
4+
import {RoutingModule, ROUTE_DECLARATIONS} from './routing.module';
5+
6+
@NgModule({
7+
imports: [
8+
SharedModule,
9+
RoutingModule
10+
],
11+
declarations: [ROUTE_DECLARATIONS]
12+
})
13+
export class MenuModule {}

demos/src/app/components/text-field-demo/routing.module.ts renamed to demos/src/app/components/menu/routing.module.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import {NgModule} from '@angular/core';
22
import {Routes, RouterModule} from '@angular/router';
33

4-
import {Api, Examples, Sass, TextFieldDemo} from './text-field-demo';
4+
import {Api, Examples, Sass, Menu} from './menu';
55

66
export const ROUTE_DECLARATIONS = [
77
Api,
88
Examples,
99
Sass,
10-
TextFieldDemo
10+
Menu
1111
];
1212

1313
const ROUTES: Routes = [
1414
{
15-
path: '', component: TextFieldDemo,
15+
path: '', component: Menu,
1616
children: [
1717
{path: '', redirectTo: 'api'},
1818
{path: 'api', component: Api},

demos/src/app/components/radio/radio.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ export class Radio implements OnInit {
2222
}],
2323
code: `import {MdcRadioModule} from '@angular-mdc/web';`,
2424
sass: `@use '@material/radio/mdc-radio';
25-
@use '@material/radio';`
25+
@use '@material/radio';
26+
@use '@material/form-field/mdc-form-field';`
2627
};
2728
}
2829
}

0 commit comments

Comments
 (0)