<p dir="auto">Unable to require dependencies on the constructor of a service.</p>
<p dir="auto">Angular <code class="notranslate">@angular/core : 2.0.0</code><br>
<code class="notranslate">"angular-cli": "1.0.0-beta.16"</code><br>
<code class="notranslate">"typescript": "2.0.2"</code></p>
<p dir="auto"><strong>Note :</strong> If I just clear the constructor dependencies defined in the <code class="notranslate">CustomerService class</code> then it works like a charm.</p>
<p dir="auto"><code class="notranslate">@Injectable() export class CustomerService constructor(private authService: AuthService, private siteService: SiteService) { }</code></p>
<p dir="auto"><code class="notranslate">AuthService and Site Service Class</code> and It's dependencies are loaded with no problem. Just some sudo facade of AuthService and SiteService Class</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Injectable()
export class AuthService 
constructor(private http: Http, private storageService: StorageService, 
            private siteService: SiteService, private router: Router) {}


@Injectable()
export class SiteService {
constructor(private http: Http, private storageService: StorageService) {}
And also App Module @ngModule decorator."><pre class="notranslate"><code class="notranslate">@Injectable()
export class AuthService 
constructor(private http: Http, private storageService: StorageService, 
            private siteService: SiteService, private router: Router) {}


@Injectable()
export class SiteService {
constructor(private http: Http, private storageService: StorageService) {}
And also App Module @ngModule decorator.
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@NgModule({
  declarations: [
    AppComponent,
    AuthComponent,
    LoginComponent,
    HeaderComponent,
    SignupComponent,
    CompanyComponent,
    Step2Component
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    AngularAppRoutingModule
  ],
  providers: [ AuthGuard, AuthService, StorageService, StepsNavigatorGuard, SiteService, CustomerService],
  bootstrap: [AppComponent]
})"><pre class="notranslate"><code class="notranslate">@NgModule({
  declarations: [
    AppComponent,
    AuthComponent,
    LoginComponent,
    HeaderComponent,
    SignupComponent,
    CompanyComponent,
    Step2Component
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    AngularAppRoutingModule
  ],
  providers: [ AuthGuard, AuthService, StorageService, StepsNavigatorGuard, SiteService, CustomerService],
  bootstrap: [AppComponent]
})
</code></pre></div>
<p dir="auto"><strong>I'm submitting a ...</strong>  (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report =&gt; search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report =&gt; search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong></p>
<p dir="auto">Services that implement the <code class="notranslate">OnDestroy</code> interface that are included in the root <code class="notranslate">NgModule</code> providers are automatically instantiated. If the service injects the <code class="notranslate">Router</code>, it throws an error.</p>
<p dir="auto"><code class="notranslate">Error: Bootstrap at least one component before injecting Router</code></p>
<p dir="auto"><strong>Expected/desired behavior</strong></p>
<p dir="auto">Services injecting the router that implement the <code class="notranslate">OnDestroy</code> interface are instantiated without error.</p>
<p dir="auto"><strong>Reproduction of the problem</strong><br>
If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the steps to reproduce and if possible a minimal demo of the problem via <a href="https://plnkr.co" rel="nofollow">https://plnkr.co</a> or similar (you can use this template as a starting point: <a href="http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5" rel="nofollow">http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5</a>).</p>
<p dir="auto"><a href="http://plnkr.co/edit/JQVPXQt62G2W56S84R5R?p=preview" rel="nofollow">http://plnkr.co/edit/JQVPXQt62G2W56S84R5R?p=preview</a></p>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p>
<p dir="auto"><strong>Please tell us about your environment:</strong></p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.0.0-rc.5</li>
<li><strong>Browser:</strong> [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]</li>
<li><strong>Language:</strong> [all | TypeScript X.X | ES6/7 | ES5]</li>
</ul>
<p dir="auto">@MikeRyan52 <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/meenie/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/meenie">@meenie</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vsavkin/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vsavkin">@vsavkin</a></p>