title: Angular 2 injected service into another service is undefined
body: <p>I'm trying to create a small framework to make it easier for me to implement CRUD functionality.</p>
  
  <p>Therefore I've created a BaseHttpService like this:</p>
  
  <pre><code>... &lt;imports&gt; ...
  @Injectable()
  export class BaseHttpService {
    constructor(
      private http: Http
    ) {
      console.log('ctor');
      this.apiUrl$.subscribe(apiUrl =&gt; this.rootApiUrl = apiUrl.removeTrailingSlash());
    }
    public getPagedResultOfType&lt;T extends IBaseEntity&gt;(url: string, vm: ISearchVm&lt;T&gt;, options?: RequestOptions): Observable&lt;PagedResult&lt;T&gt;&gt;{ ... &lt;implementation&gt; ... }
    ... &lt;other methods&gt; ...
  }
  </code></pre>
  
  <p>Then I have my BaseEntityReadOnlyService that uses this BaseHttpService to create the Read fucntionality of the CRUD:</p>
  
  <pre><code>@Injectable()
  export class BaseAppSumEntityReadOnlyService&lt;T extends IBaseEntity&gt;{
    constructor(
      @Inject(forwardRef(() =&gt; BaseHttpService)) public baseHttpService: BaseHttpService
      // public baseHttpService: BaseHttpService
    ) { 
      console.log('ro ctor');
      console.log(this.baseHttpService); // &lt;-- this is always undefined
    }
  
    getAll(vm: ISearchVm&lt;T&gt;): Observable&lt;PagedResult&lt;T&gt;&gt;{
      const url = `${this.baseUrl}`;
      console.log(this.baseHttpService);
      return this.baseHttpService.getPagedResultOfType&lt;T&gt;(url, vm); // &lt;-- this fails because baseHttpService is undefined: Cannot read property 'getPagedResultOfType' of undefined
    }
    ... &lt;more methods&gt;
  }
  </code></pre>
  
  <p>In my FrameworkModule, I've tried alot:</p>
  
  <pre><code>@NgModule({
    declarations: [
      ...
    ],
    imports: [
      CommonModule,
      HttpModule
    ],
    providers: [
      BaseHttpService,
      // BaseAppSumEntityReadOnlyService
      { provide: BaseAppSumEntityReadOnlyService, useClass: BaseAppSumEntityReadOnlyService, deps: [ BaseHttpService ] },
    ]
  })
  export class AppSumFrameworkModule { }
  </code></pre>
  
  <p>This is what I currently have, but this does not work. The error I get is:</p>
  
  <blockquote>
    <p>Cannot read property 'getPagedResultOfType' of undefined</p>
  </blockquote>
  
  <p>How can I get the BaseHttpService to be injected in my BaseAppSumEntityReadOnlyService?</p>