Angular 22 · Routing and forms

Lazy-load a route

Load a component's code only when its route is visited.

{ path: 'admin', loadComponent: () => import('./admin').then((m) => m.AdminComponent) }

Official Angular 22 documentation

More routing and forms commands

All routing and forms commands · Angular 22 cheatsheet

Was this page helpful?