title: Failed: Can't resolve all parameters for MyComponent: (?,?,?) in ng test
body: <p>I am using Angular 6, with Angular CLI AOT to compile. So far so good until I was going to do some UI tests, in addition to current tests for functions, running with Karma.</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { Router } from '@angular/router';
  
  @Component({
  
      templateUrl: 'notFound.component.html'
  })
  export class NotFoundComponent implements OnInit {
  
  
      constructor(private router: Router) {
          console.debug('NotFoundComponent created');
      }
  
      ngOnInit() {
      }
  
      home() {
              this.router.navigate(['/']);
      }
  
  }
  </code></pre>
  
  <p>The application is running fine and the component can be rendered by NG runtime properly. However, when running with ng test, I get:</p>
  
  <pre><code>Failed: Can't resolve all parameters for NotFoundComponent: (?)
  </code></pre>
  
  <p>And I have to do this to make things work in test:</p>
  
  <pre><code>constructor( @Inject(Router) private router: Router) 
  </code></pre>
  
  <p>Do I miss something? Is it possible to make ng test to accept injection of Router without @Inject() in the constructor?</p>