Does every HTTP request in Angular 2 create a new observable
?
Are we need to unsubscribe every HTTP request, that we subscribing while getting a result ?
Asked
Active
Viewed 76 times
-2

Ankit Rana
- 383
- 6
- 24
-
2Possible duplicate of [Angular/RxJs When should I unsubscribe from \`Subscription\`](https://stackoverflow.com/questions/38008334/angular-rxjs-when-should-i-unsubscribe-from-subscription) – eko Jul 10 '17 at 12:04
1 Answers
1
For the question if every http request creates a new observable, the answer is yes. For the question if you need to unsubscribe every http the answer is no.
The reason is that http request complete after the request is fetched. So after the complete of the request, the subscription is done and there's no need to unsubscribe.

Gili Yaniv
- 3,073
- 2
- 19
- 34