Angular12 min read
Lazy Loading Routes for Faster Angular Apps
Load feature pages only when needed to improve performance, especially for big websites.
Kevin Howard
August 18, 2025
11.3k365
Lazy loading means you do not ship the whole app upfront. You load a feature only when the user visits it.
Example: Lazy-load a component route
{
path: 'admin',
loadComponent: () =>
import('./admin/admin.component').then(m => m.AdminComponent)
}
Why it helps
- smaller initial bundle
- faster first load
- better performance on mobile networks
Visual: eager vs lazy
flowchart LR
A[App Load] --> B1[Eager: Load Everything]
A --> B2[Lazy: Load Home Only]
B2 --> C[User Visits /admin]
C --> D[Load Admin Feature]
Next: HTTP requests, calling APIs with HttpClient.
#Angular#Performance#Intermediate