πŸ“Š Angular
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
πŸ’¬ Discuss
βœ… Correct Answer: (A) To optimize rendering by tracking items by unique identifier

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

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

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
55
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
87%
Success Rate