Georgi Parlakov
1 min readJun 24, 2019

--

Lazy loading can be achieved by just pointing the router to the module using the special string syntax*, or the new ESNext import syntax*. No need to import anything from the module-to-be-lazy-loaded, including routes.
For example take a look at his repo: personal-routing.module gets imported into personal.module and the main routing module only points to the personal.module

*See Route Configurations use Dynamic Imports in this article from Angular core team

--

--

Georgi Parlakov
Georgi Parlakov

Written by Georgi Parlakov

Angular and DotNet dev. RxJs explorer. Testing proponent. A dad. Educative.io course author. https://gparlakov.github.io/

No responses yet