Which operator can be used to automatically unsubscribe from an observable when a component is destroyed?

  • "map" operator
  • "subscribe" operator
  • "takeUntil" operator
  • "tap" operator
The "takeUntil" operator is commonly used to automatically unsubscribe from an observable when a component is destroyed. It takes an observable that emits when the component is destroyed, ensuring that the original observable is unsubscribed.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *