title: How to dynamically select drop-down lists in angular 5?
body: <p>I am trying to implement a select option for angular 5 with dynamic selection box depends on which backend component sends the selection.</p>
  
  <p><a href="https://i.stack.imgur.com/8cgsh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8cgsh.png" alt="enter image description here"></a></p>
  
  <p>Please note that both of the selectBox are the same box just the value inside of the option changes.</p>
  
  <p><strong><em>selector.html</em></strong></p>
  
  <pre><code>&lt;html&gt;
  ...
      &lt;select&gt;
              &lt;option *ngFor="let selectorA in selectorAs"&gt;{{selectorAs}}&lt;/option&gt;
      &lt;/select&gt;
  ...
  </code></pre>
  
  <p><strong><em>selector.ts</em></strong></p>
  
  <pre><code>import{component} from '@angular/core'
  @component({
  selector: 'app-root'
  templateUrl: './selector.html'
  styleUrl: './selector.css'
  })
  export class AppComponent{
  title = 'app';
  selectorAs = ["option 1", "option 2", "option 3"];
  selectorBs = ["option A", "option B", "option C"];
  </code></pre>
  
  <p>So my question is how do i make the select option dynamic to choose selectorBs instead of selectorAs based on the flag it passes in?</p>