Skip to content

Commit 6baffb3

Browse files
devversionjelbourn
authored andcommitted
refactor: add examples to example module entry components
Adds all examples as entry-components so that examples can be lazily loaded in View Engine. We still support View Engine in our dev-app to test/compare components or reproduce VE/Ivy bugs. We can revert this commit once we drop support for the `--config=view-engine` switch.
1 parent c0c9f4a commit 6baffb3

File tree

48 files changed

+52
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+52
-15
lines changed

src/components-examples/cdk-experimental/popover-edit/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const EXAMPLES = [
4545
],
4646
declarations: EXAMPLES,
4747
exports: EXAMPLES,
48+
entryComponents: EXAMPLES,
4849
})
4950
export class CdkPopoverEditExamplesModule {
5051
}

src/components-examples/cdk/a11y/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const EXAMPLES = [
2424
],
2525
declarations: EXAMPLES,
2626
exports: EXAMPLES,
27+
entryComponents: EXAMPLES,
2728
})
2829
export class CdkA11yExamplesModule {
2930
}

src/components-examples/cdk/clipboard/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const EXAMPLES = [CdkClipboardOverviewExample];
1111
imports: [ClipboardModule, FormsModule],
1212
declarations: EXAMPLES,
1313
exports: EXAMPLES,
14+
entryComponents: EXAMPLES,
1415
})
1516
export class CdkClipboardExamplesModule {
1617
}

src/components-examples/cdk/drag-drop/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ const EXAMPLES = [
8585
],
8686
declarations: EXAMPLES,
8787
exports: EXAMPLES,
88+
entryComponents: EXAMPLES,
8889
})
8990
export class CdkDragDropExamplesModule {
9091
}

src/components-examples/cdk/platform/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const EXAMPLES = [CdkPlatformOverviewExample];
1212
],
1313
declarations: EXAMPLES,
1414
exports: EXAMPLES,
15+
entryComponents: EXAMPLES,
1516
})
1617
export class CdkPlatformExamplesModule {
1718
}

src/components-examples/cdk/portal/index.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@ const EXAMPLES = [
1313
];
1414

1515
@NgModule({
16-
imports: [
17-
PortalModule,
18-
],
16+
imports: [PortalModule],
1917
declarations: EXAMPLES,
2018
exports: EXAMPLES,
21-
entryComponents: [ComponentPortalExample]
19+
entryComponents: EXAMPLES,
2220
})
2321
export class CdkPortalExamplesModule {
2422
}

src/components-examples/cdk/scrolling/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,10 @@ const EXAMPLES = [
4646
];
4747

4848
@NgModule({
49-
imports: [
50-
ScrollingModule,
51-
],
49+
imports: [ScrollingModule],
5250
declarations: EXAMPLES,
5351
exports: EXAMPLES,
52+
entryComponents: EXAMPLES,
5453
})
5554
export class CdkScrollingExamplesModule {
5655
}

src/components-examples/cdk/stepper/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const EXAMPLES = [
2323
],
2424
declarations: EXAMPLES,
2525
exports: EXAMPLES,
26+
entryComponents: EXAMPLES,
2627
})
2728
export class CdkStepperExamplesModule {
2829
}

src/components-examples/cdk/table/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const EXAMPLES = [
1919
],
2020
declarations: EXAMPLES,
2121
exports: EXAMPLES,
22+
entryComponents: EXAMPLES,
2223
})
2324
export class CdkTableExamplesModule {
2425
}

src/components-examples/cdk/text-field/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const EXAMPLES = [
3434
],
3535
declarations: EXAMPLES,
3636
exports: EXAMPLES,
37+
entryComponents: EXAMPLES,
3738
})
3839
export class CdkTextFieldExamplesModule {
3940
}

src/components-examples/cdk/tree/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const EXAMPLES = [
2323
],
2424
declarations: EXAMPLES,
2525
exports: EXAMPLES,
26+
entryComponents: EXAMPLES,
2627
})
2728
export class CdkTreeExamplesModule {
2829
}

src/components-examples/material-experimental/mdc-form-field/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const EXAMPLES = [
2626
],
2727
declarations: [...EXAMPLES, MyTelInput],
2828
exports: EXAMPLES,
29+
entryComponents: EXAMPLES,
2930
})
3031
export class MdcFormFieldExamplesModule {
3132
}

src/components-examples/material-experimental/popover-edit/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ const EXAMPLES = [
4949
],
5050
declarations: EXAMPLES,
5151
exports: EXAMPLES,
52+
entryComponents: EXAMPLES,
5253
})
5354
export class PopoverEditExamplesModule {
5455
}

src/components-examples/material/autocomplete/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ const EXAMPLES = [
4949
],
5050
declarations: EXAMPLES,
5151
exports: EXAMPLES,
52+
entryComponents: EXAMPLES,
5253
})
5354
export class AutocompleteExamplesModule {
5455
}

src/components-examples/material/badge/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const EXAMPLES = [
1818
],
1919
declarations: EXAMPLES,
2020
exports: EXAMPLES,
21+
entryComponents: EXAMPLES,
2122
})
2223
export class BadgeExamplesModule {
2324
}

src/components-examples/material/bottom-sheet/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const EXAMPLES = [
2525
],
2626
declarations: EXAMPLES,
2727
exports: EXAMPLES,
28-
entryComponents: [BottomSheetOverviewExampleSheet],
28+
entryComponents: EXAMPLES,
2929
})
3030
export class BottomSheetExamplesModule {
3131
}

src/components-examples/material/button-toggle/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const EXAMPLES = [
2828
],
2929
declarations: EXAMPLES,
3030
exports: EXAMPLES,
31+
entryComponents: EXAMPLES,
3132
})
3233
export class ButtonToggleExamplesModule {
3334
}

src/components-examples/material/button/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const EXAMPLES = [
2121
],
2222
declarations: EXAMPLES,
2323
exports: EXAMPLES,
24+
entryComponents: EXAMPLES,
2425
})
2526
export class ButtonExamplesModule {
2627
}

src/components-examples/material/card/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const EXAMPLES = [
2121
],
2222
declarations: EXAMPLES,
2323
exports: EXAMPLES,
24+
entryComponents: EXAMPLES,
2425
})
2526
export class CardExamplesModule {
2627
}

src/components-examples/material/checkbox/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const EXAMPLES = [
2525
],
2626
declarations: EXAMPLES,
2727
exports: EXAMPLES,
28+
entryComponents: EXAMPLES,
2829
})
2930
export class CheckboxExamplesModule {
3031
}

src/components-examples/material/chips/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const EXAMPLES = [
4040
],
4141
declarations: EXAMPLES,
4242
exports: EXAMPLES,
43+
entryComponents: EXAMPLES,
4344
})
4445
export class ChipsExamplesModule {
4546
}

src/components-examples/material/core/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const EXAMPLES = [
2727
],
2828
declarations: EXAMPLES,
2929
exports: EXAMPLES,
30+
entryComponents: EXAMPLES,
3031
})
3132
export class CoreExamplesModule {
3233
}

src/components-examples/material/datepicker/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ const EXAMPLES = [
8484
],
8585
declarations: EXAMPLES,
8686
exports: EXAMPLES,
87+
entryComponents: EXAMPLES,
8788
})
8889
export class DatepickerExamplesModule {
8990
}

src/components-examples/material/dialog/index.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,7 @@ const EXAMPLES = [
5050
],
5151
declarations: EXAMPLES,
5252
exports: EXAMPLES,
53-
entryComponents: [
54-
DialogContentExampleDialog,
55-
DialogDataExampleDialog,
56-
DialogElementsExampleDialog,
57-
DialogOverviewExampleDialog,
58-
]
53+
entryComponents: EXAMPLES,
5954
})
6055
export class DialogExamplesModule {
6156
}

src/components-examples/material/divider/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ const EXAMPLES = [
1515
MatListModule,
1616
],
1717
declarations: EXAMPLES,
18+
exports: EXAMPLES,
19+
entryComponents: EXAMPLES,
1820
})
1921
export class DividerExamplesModule {
2022
}

src/components-examples/material/expansion/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ const EXAMPLES = [
3131
MatInputModule,
3232
],
3333
declarations: EXAMPLES,
34+
exports: EXAMPLES,
35+
entryComponents: EXAMPLES,
3436
})
3537
export class ExpansionExamplesModule {
3638
}

src/components-examples/material/form-field/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ const EXAMPLES = [
5959
],
6060
declarations: [...EXAMPLES, MyTelInput],
6161
exports: EXAMPLES,
62+
entryComponents: EXAMPLES,
6263
})
6364
export class FormFieldExamplesModule {
6465
}

src/components-examples/material/grid-list/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const EXAMPLES = [
2121
],
2222
declarations: EXAMPLES,
2323
exports: EXAMPLES,
24+
entryComponents: EXAMPLES,
2425
})
2526
export class GridListExamplesModule {
2627
}

src/components-examples/material/icon/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const EXAMPLES = [
1919
],
2020
declarations: EXAMPLES,
2121
exports: EXAMPLES,
22+
entryComponents: EXAMPLES,
2223
})
2324
export class IconExamplesModule {
2425
}

src/components-examples/material/input/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const EXAMPLES = [
4545
],
4646
declarations: EXAMPLES,
4747
exports: EXAMPLES,
48+
entryComponents: EXAMPLES,
4849
})
4950
export class InputExamplesModule {
5051
}

src/components-examples/material/list/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const EXAMPLES = [
2929
],
3030
declarations: EXAMPLES,
3131
exports: EXAMPLES,
32+
entryComponents: EXAMPLES,
3233
})
3334
export class ListExamplesModule {
3435
}

src/components-examples/material/menu/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const EXAMPLES = [
2929
],
3030
declarations: EXAMPLES,
3131
exports: EXAMPLES,
32+
entryComponents: EXAMPLES,
3233
})
3334
export class MenuExamplesModule {
3435
}

src/components-examples/material/paginator/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const EXAMPLES = [
2727
],
2828
declarations: EXAMPLES,
2929
exports: EXAMPLES,
30+
entryComponents: EXAMPLES,
3031
})
3132
export class PaginatorExamplesModule {
3233
}

src/components-examples/material/progress-bar/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const EXAMPLES = [
4444
],
4545
declarations: EXAMPLES,
4646
exports: EXAMPLES,
47+
entryComponents: EXAMPLES,
4748
})
4849
export class ProgressBarExamplesModule {
4950
}

src/components-examples/material/progress-spinner/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const EXAMPLES = [
3333
],
3434
declarations: EXAMPLES,
3535
exports: EXAMPLES,
36+
entryComponents: EXAMPLES,
3637
})
3738
export class ProgressSpinnerExamplesModule {
3839
}

src/components-examples/material/radio/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const EXAMPLES = [
2323
],
2424
declarations: EXAMPLES,
2525
exports: EXAMPLES,
26+
entryComponents: EXAMPLES,
2627
})
2728
export class RadioExamplesModule {
2829
}

src/components-examples/material/select/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ const EXAMPLES = [
6666
],
6767
declarations: EXAMPLES,
6868
exports: EXAMPLES,
69+
entryComponents: EXAMPLES,
6970
})
7071
export class SelectExamplesModule {
7172
}

src/components-examples/material/sidenav/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ const EXAMPLES = [
6464
],
6565
declarations: EXAMPLES,
6666
exports: EXAMPLES,
67+
entryComponents: EXAMPLES,
6768
})
6869
export class SidenavExamplesModule {
6970
}

src/components-examples/material/slide-toggle/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const EXAMPLES = [
3535
],
3636
declarations: EXAMPLES,
3737
exports: EXAMPLES,
38+
entryComponents: EXAMPLES,
3839
})
3940
export class SlideToggleExamplesModule {
4041
}

src/components-examples/material/slider/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const EXAMPLES = [
3232
],
3333
declarations: EXAMPLES,
3434
exports: EXAMPLES,
35+
entryComponents: EXAMPLES,
3536
})
3637
export class SliderExamplesModule {
3738
}

src/components-examples/material/snack-bar/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const EXAMPLES = [
3434
],
3535
declarations: [...EXAMPLES, PizzaPartyComponent],
3636
exports: EXAMPLES,
37-
entryComponents: [PizzaPartyComponent],
37+
entryComponents: [...EXAMPLES, PizzaPartyComponent],
3838
})
3939
export class SnackBarExamplesModule {
4040
}

src/components-examples/material/sort/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const EXAMPLES = [
1616
],
1717
declarations: EXAMPLES,
1818
exports: EXAMPLES,
19+
entryComponents: EXAMPLES,
1920
})
2021
export class SortExamplesModule {
2122
}

src/components-examples/material/stepper/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const EXAMPLES = [
4444
],
4545
declarations: EXAMPLES,
4646
exports: EXAMPLES,
47+
entryComponents: EXAMPLES,
4748
})
4849
export class StepperExamplesModule {
4950
}

src/components-examples/material/table/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ const EXAMPLES = [
8080
],
8181
declarations: EXAMPLES,
8282
exports: EXAMPLES,
83+
entryComponents: EXAMPLES,
8384
})
8485
export class TableExamplesModule {
8586
}

src/components-examples/material/tabs/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ const EXAMPLES = [
6565
],
6666
declarations: EXAMPLES,
6767
exports: EXAMPLES,
68+
entryComponents: EXAMPLES,
6869
})
6970
export class TabGroupExamplesModule {
7071
}

src/components-examples/material/toolbar/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const EXAMPLES = [
2121
],
2222
declarations: EXAMPLES,
2323
exports: EXAMPLES,
24+
entryComponents: EXAMPLES,
2425
})
2526
export class ToolbarExamplesModule {
2627
}

src/components-examples/material/tooltip/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ const EXAMPLES = [
5454
],
5555
declarations: EXAMPLES,
5656
exports: EXAMPLES,
57+
entryComponents: EXAMPLES,
5758
})
5859
export class TooltipExamplesModule {
5960
}

0 commit comments

Comments
 (0)