title: angular 6 dependency injection
body: <p>In the latest release of Angular 6, a service is registered in a module using the <code>providedIn</code> property in the service metadata:</p>
  
  <pre><code>@Injectable({
    providedIn: 'root',
  })
  export class HeroService {}
  </code></pre>
  
  <p>However the documentation still also refers to registering the service in the module <code>providers</code> array in the module metadata just like we did in Angular 5:</p>
  
  <pre><code>@NgModule({
    providers: [HeroService],
  })
  export class AppModule {}
  </code></pre>
  
  <p>So,</p>
  
  <ul>
  <li>Which method should be used to make the injector aware of the service that it should inject?</li>
  <li>Will the module <code>providers</code> array method be deprecated?</li>
  </ul>