What is the best practice to unsubscribe within a Angular2 service from a http subscription?
Currently I do this but I\'m not sure if this will be the best way.
You don't need to unsubscribe from observable created by Http
or HttpClient
because it is finite observable (value will be emitted only once and complete
will be called).
However, you CAN unsubscribe from the observable created by HttpClient
to cancel the request. It mean you are no longer interested in data returned by the request.