Out of the box Angular provides two strategies already implemented for us, pretty explanatory from the name:
- NoPreloading — no modules are preloaded, this is the default behaviour
- PreloadAllModules — all modules are preloaded as fast as possible
While this will work in some scenarios, we might want to create something a bit more complex here.
David Dal Busco and Aaron Sterling developed a custom preloading strategy that can be triggered only on demand.
Read David’s article: