A

Admin • 802.91K Points
Coach

Q. What is the purpose of the 'trackBy' function in *ngFor?

  • (A) To optimize rendering by tracking items by unique identifier
  • (B) To filter items in the list
  • (C) To sort the list
  • (D) To bind CSS classes
  • Correct Answer - Option(A)
  • Views: 5
  • Filed under category Angular JS
  • Hashtags:

Explanation by: Admin
trackBy helps Angular detect which items changed to minimize DOM updates.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.