A

Admin • 802.91K Points
Coach

Q. What is the use of the `trackBy` function in *ngFor?

  • (A) To filter the items
  • (B) To sort the items
  • (C) To improve performance by tracking item identity
  • (D) To convert item to string
  • Correct Answer - Option(C)
  • Views: 5
  • Filed under category Angular JS
  • Hashtags:

Explanation by: Admin
trackBy helps Angular track which items have changed, improving rendering performance.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.