Angular2: Unsubscribe from http observable in Service
问题 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. import { Injectable } from "@angular/core"; import { Http } from "@angular/http"; import { Subject } from "rxjs/Subject"; import { ISubscription } from "rxjs/Subscription"; @Injectable() export class SearchService { private _searchSource = new Subject<any>(); public search$ = this._searchSource.asObservable(); constructor(private _http