Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 613 Bytes

README.md

File metadata and controls

25 lines (20 loc) · 613 Bytes

This is an example repo that demos how to dynamically load components in a lazy loaded module in Angular 2+

This almost entirely relies on @jmcclanahan's answers in this thread: angular/angular#14324

App Structure:

[AppComponent] 
|
|
V
[HomeComponent] (lazyloaded)
|
|
V
[DynamicModule] --->  (Conditionally loads CompA or B)
|                   |
|                   |
V                   V
[ComponentA]        [ComponentB]

Injector Graph

dependency graph