Angular has always made it easy to lazy-load routes and components.

But what about services?

Imagine your application has an export feature that depends on a large library for generating spreadsheets or PDFs.

Only a small percentage of users click Export, but the code behind that feature may still end up being part of the initial JavaScript bundle.

Angular 22 introduces a simple solution: