Skip to content

Commit 9761d39

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. (cherry picked from commit 6baffb3)
1 parent 7a2d372 commit 9761d39

File tree

47 files changed

+51
-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.

47 files changed

+51
-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
}

0 commit comments

Comments
 (0)