<p dir="auto">I have a service, which is a class that internally uses Http:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Injectable()
export class ProductService{

    constructor( private http: Http){}

    getProductByID(productID: string): Observable{
       return this.http.get(`/products/${productID}`)
           .map(res =&gt; res.json());
    }
}"><pre class="notranslate"><code class="notranslate">@Injectable()
export class ProductService{

    constructor( private http: Http){}

    getProductByID(productID: string): Observable{
       return this.http.get(`/products/${productID}`)
           .map(res =&gt; res.json());
    }
}
</code></pre></div>
<p dir="auto">To use this service, an external component must specify [HTTP_PROVIDERS]. This breaks encapsulation of my ProductService (a.k.a. Leaky Abstraction): now it's not a reusable black box but has strings attached. If I decide to replace Http with another service in the above code, the external component must modify its code as well. It would be nice if there was a way to allow a class (not a component) to specify its own providers.</p>
<p dir="auto">Am I asking for too much?  :)</p>
<p dir="auto">In the new typings files for http the following lines</p>
<ul dir="auto">
<li><code class="notranslate">type-alias RequestOptionsArgs;</code></li>
<li><code class="notranslate">type-alias ResponseOptionsArgs;</code></li>
</ul>
<p dir="auto">are throwing this error message</p>
<p dir="auto"><code class="notranslate">typings/angular2/http.d.ts(367,16): error TS1005: ';' expected.</code><br>
<code class="notranslate">typings/angular2/http.d.ts(374,16): error TS1005: ';' expected.</code></p>
<p dir="auto">One solution is to comment/remove them.</p>
<p dir="auto">The file is the one obtained doing</p>
<p dir="auto"><code class="notranslate">npm install angular2@2.0.0-alpha.35</code></p>
<p dir="auto">See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="102011506" data-permission-text="Title is private" data-url="https://github.com/angular/angular/issues/3733" data-hovercard-type="issue" data-hovercard-url="/angular/angular/issues/3733/hovercard" href="https://github.com/angular/angular/issues/3733">#3733</a><br>
and <a href="https://gitter.im/angular/angular?at=55d4b40d1ba62e4a21fa68cc" rel="nofollow">https://gitter.im/angular/angular?at=55d4b40d1ba62e4a21fa68cc</a></p>