Skip to content

Commit e8ddc8b

Browse files
committed
feat: add example 12 for on-demand preloading and modal service with dynamic component creation
1 parent 3dd6aff commit e8ddc8b

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/app/examples/advanced/advanced-routings.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,9 @@ const ADVANCED_ROUTES: Route[] = [
6161
loadComponent: () =>
6262
import('./example11/example11.component').then(x => x.Example11Component),
6363
},
64+
{
65+
path: 'example12',
66+
loadChildren: () => import('./example12/example12-routings'),
67+
},
6468
]
6569
export default ADVANCED_ROUTES;

src/app/examples/advanced/advanced.const.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,14 @@ export const ADVANCED_EXAMPLES: ExampleModel[] = [
5151
content: 'A real-time collaborative list using Angular signals and the browser storage event. Add, edit, or remove items and see changes sync instantly across tabs/windows—no backend required.',
5252
routerLink: 'example10',
5353
},
54+
{
55+
title: 'Modal Service with ViewContainerRef',
56+
content: 'Open a modal using a service and ViewContainerRef. Demonstrates dynamic component creation and service-driven modals.',
57+
routerLink: 'example11',
58+
},
59+
{
60+
title: 'On-Demand Preloading via Service & Custom Strategy',
61+
content: 'Preload modules only when triggered (e.g., on hover) using a service and custom PreloadingStrategy. Demonstrates bandwidth savings and modern Angular routing.',
62+
routerLink: 'example12',
63+
},
5464
];

0 commit comments

Comments
 (0)