What is Angular TrackBy in ngFor?

Updated Apr 28, 2026

Short answer

TrackBy optimizes rendering by identifying list items uniquely.

Deep explanation

Without TrackBy, Angular re-renders entire list. TrackBy improves performance by updating only changed items.

Real-world example

Efficient rendering of large lists.

Common mistakes

  • Not using TrackBy in big lists.

Follow-up questions

  • Why TrackBy?
  • What happens without it?

More Angular interview questions

View all →