Use dependency in base class without having to pass this dependency from inheriting class
<p>In my quest to learn Angular2, i came across the following situation:</p>

<ul>
<li>1 base class, which uses the angular2/http dependency</li>
<li>1 inheriting class which extends the base class</li>
</ul>

<p>How can I inject the angular2/http dependency in the base class's constructor, without having to pass http as a parameter when instantiating the inheriting class.</p>

<p>I don't use http in the inheriting class, so I don't want to see it there!</p>

<p>For example</p>

<pre><code>// base class
class CRUDService {

    // http is used in this service, so I need to inject it here
    constructor(@Inject(Http) http) {}

    findAll() {
        return this.http.get('http://some.api.com/api/some-model');
    }
}

// inheriting class
class ThingService extends CRUDService {

    constructor() {
        // because we extend the base class, we need to call super()
        // this will fail since it expects http as a parameter
        // BUT i don't use http in this class, I don't want to inject it here
        super();
    }
}
</code></pre>

<p>Ideally, I would just create a new http instance in the base class and use that like so <code>let http = new Http();</code>, but that obviously doesn't work.</p>