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

  • (A) To improve performance by tracking list items
  • (B) To display index numbers
  • (C) To bind CSS styles
  • (D) To change layout structure
πŸ’¬ Discuss
βœ… Correct Answer: (A) To improve performance by tracking list items
Explanation: trackBy helps Angular track which items have changed, improving performance.
Explanation by: Mr. Dubey
trackBy helps Angular track which items have changed, improving performance.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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