Inspect router tree

Navigate to the base route of the app and use Augury to inspect the router tree, as illustrated:

Router Tree with eager loading mistakes

Everything, but initially required components, should be denoted with the [Lazy] attribute. If, for some reason, routes are not denoted with [Lazy], chances are that they are mistakenly being imported in app.module or some other component.

In the preceding screenshot, you may note that ProfileComponent and LogoutComponent are eagerly loaded, whereas the user module is correctly labeled as [Lazy]. Even multiple visual inspections through the tooling and the code base may leave you searching ...

Get Angular 6 for Enterprise-Ready Web Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.