Dependency injection into abstract class typescript(Angular2) : <p>I have abstract class(without constructor) and I want to inject another class into it.</p>

<p>Abstract class:</p>

<pre><code>import { ErrorHandler } from '../../shared/services/errorHandler.service';
import { Inject } from '@angular/core';


export abstract class BaseApiComponent&lt;T&gt; {
    @Inject(ErrorHandler) errorHandler: ErrorHandler;

    this.errorHandler.test();
}
</code></pre>

<p>Injected class:</p>

<pre><code>import { Injectable } from '@angular/core';

@Injectable()
export class ErrorHandler  {
  constructor() { }


  public test() {
    console.log('Test');
  }

}
</code></pre>

<p>And I have next error</p>

<pre><code>ORIGINAL EXCEPTION: TypeError: Cannot read property 'test' of undefined
</code></pre>

<p>How i can fix this? </p>
