1

I have angular 4 project with alot of observables, I read lately in some tutorials that i need to unsubscribe the observables always, while in other tutorials I saw that I need only to unsubscribe in infinite observables..

Well In my application i use the observable for only passing one value(like promise) and after the observable.next I use always Observable.complete

So what is the correct approach?: maybe promise is enough for me? Also I didn't find alot of resources in the internet about observables, and if I do unsubscribe for each observable I will not have clean code.. Thanks

Zakk
  • 758
  • 3
  • 11
  • 20
  • While that above comment applies to Subscriptions, if you're only using a Promise internally then `.complete()` is enough to destroy the Observable. – Z. Bagley Sep 29 '17 at 15:10

0 Answers0