title: Angular 5: Can't resolve all parameters for component
body: <p>I've encountered a problem with injecting services in angular 5 as in tutorial.</p>
  
  <p>I have a simple service</p>
  
  <pre><code>@Injectable()
  export class SimpleService {
      ...
  }
  </code></pre>
  
  <p>And a simple component:</p>
  
  <pre><code>@Component({...})
  export class SimpleComponent {
      constructor(private simpleService SimpleService) {}
  }
  </code></pre>
  
  <p>A service is set to <code>providers</code> in module:</p>
  
  <pre><code>@NgModule({
      ...
      providers: [SimpleService]
      ...
  })
  export class SimpleModule {}
  </code></pre>
  
  <p>I see the following error in console:</p>
  
  <pre><code>Error: Can't resolve all parameters for SimpleComponent
  </code></pre>
  
  <p>However, if I inject the <code>SimpleService</code> with <code>@Inject</code> like </p>
  
  <pre><code>@Inject(SimpleService) private simpleService: SimpleService
  </code></pre>
  
  <p>the error disappears.</p>
  
  <p>What am I doing wrong?</p>
  
  <p>UPDATE:
  I saw several answers where people advise to add <code>emitDecoratorMetadata: true</code> to tsconfig file. But this line is already there</p>