What are the main ways to improve Angular app performance?
Model answer
Load less: lazy load routes, use @defer for heavy parts, remove unused imports and libraries, and optimise images (NgOptimizedImage, correct sizes, modern formats). Do less work: OnPush or signals, track in lists, pure pipes instead of methods called in templates, and avoid heavy calculations in templates.
Check the network: cache data, avoid duplicate requests. Measure first with the Angular DevTools profiler, Lighthouse and the build's bundle report, and fix the biggest problems rather than guessing.
Learn this topic
Angular Tutorial: Beginner to Advanced .
Sign in to add your own answer.
More questions
- Why is track important in @for (or trackBy in *ngFor)?
- Why is calling a method in a template expression a performance problem?
- What is NgOptimizedImage and what does it give you?
- What is server-side rendering (SSR), and why would you use it?
- What is hydration in Angular?
- What is the difference between SSR, SSG (prerendering) and CSR, and how do you choose?