A

Admin • 828.70K Points
Coach

Q. How do you unsubscribe from an Observable in Angular to prevent memory leaks?

  • (A) Call unsubscribe() method on the subscription
  • (B) Use async pipe only
  • (C) Unsubscribe is automatic, no action needed
  • (D) Call complete() method on Observable
  • Correct Answer - Option(A)
  • Views: 17
  • Filed under category Angular JS
  • Hashtags:

Explanation by: Admin
Manually unsubscribe or use async pipe to avoid leaks.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.