Modules are not what you think they are
summary
Claim: Angular modules compile into a single factory/injector so imported modules merge providers and there is no runtime module hierarchy. Process shown: load module class, compile to a module factory (AOT optional), call create to get module instance and injector, read widgets via a widgets provider token, resolve and render components with ComponentFactoryResolver. Built a diagram-designer extension system that loads third-party widget modules lazily and it works; router code served as the blueprint.
AI-written summary · about
chapters (18)
- 0:00Intro
- 0:55Angular modules are confusing
- 1:52You will learn
- 2:28Application as platform
- 2:57Platform & extensions
- 3:49Challenges
- 5:21Difficult challenge?
- 6:17Router implementation
- 7:31Module factory
- 8:21Module & injector instance
- 9:11Modules to injectors
- 9:40Imported modules & factories
- 10:50No more confusions
- 11:52Loading widgets
- 13:12Providing widgets
- 14:22Loading and rendering widgets
- 15:59Feeling stuck?
- 16:45Useful resources
related talks
31mLegend of ngModules - Angular 2 and Beyond
22mModule vs Module
18mAngular's Future w/out NgModules Architectures w/Standalone Components
30mClimbing up injector trees
46mAngular Dependency Injection – Understanding hierarchical injectors
41mThe future is modules not frameworks. JS modules Architecture demo.
28mUnleash The Power Of Angular With Knowledge of Patterns
39mDeep DI-ving: how Angular's DI system defeated a monolith
