Q. Which Angular feature helps avoid memory leaks with Observable subscriptions?

  • (A) Unsubscribe in ngOnDestroy
  • (B) Use @Input decorator
  • (C) Use ngIf directive
  • (D) Use ngFor directive
πŸ’¬ Discuss
βœ… Correct Answer: (A) Unsubscribe in ngOnDestroy
Explanation: Unsubscribing in ngOnDestroy prevents memory leaks from Observables.
Explanation by: Mr. Dubey
Unsubscribing in ngOnDestroy prevents memory leaks from Observables.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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