title: How to conditionally inject service into component?
body: <p>I have 2 services <code>one.service.ts</code> and <code>two.service.ts</code>, and a component <code>dashboard.component.ts</code>.</p>
  <p>How to conditionally inject those service into the component?</p>
  <pre><code>import { Component, ViewEncapsulation, Inject } from '@angular/core';
  import { OneService } from '../services/one.service';
  import { TwoService } from '../services/two.service';
  
  @Component({
    selector: 'dashboard',
    encapsulation: ViewEncapsulation.Emulated,
    styleUrls: ['./dashboard.less'],
    templateUrl: './dashboard.html'
  })
  export class DashboardComponent {
      constructor() {
         // Here how do I get service instance based on some this condition.
           if(true) {
               /* Service **one.service.ts** to be injected */
           } else {
               /* Service **two.service.ts** to be injected */    
           }
  
      }
  }
  </code></pre>