Q. How can you optimize Angular app performance by avoiding unnecessary change detection?

  • (A) Use ChangeDetectionStrategy.OnPush
  • (B) Use ngIf directive
  • (C) Use event binding only
  • (D) Use services instead of components
πŸ’¬ Discuss
βœ… Correct Answer: (A) Use ChangeDetectionStrategy.OnPush
Explanation: OnPush strategy checks for changes only when input properties change.
Explanation by: Mr. Dubey
OnPush strategy checks for changes only when input properties change.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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