title: Angular - how to get value selected in dropdown menu?
body: <p><strong>Goal</strong>: I want to be able to have the user click a value in a dropdown, that will change the address of the site they are on, based on the selection.</p>
  
  <p><strong>Problem</strong>: I was able to get it to change the address, but it would do it no matter what selection they made. I want it to go to a different address for each selection. </p>
  
  <p>So if they choose "English" I want it to go to site.com/en. And if they choose Spanish I want it to go to site.com/es</p>
  
  <p><strong>What I tried</strong>: </p>
  
  <p>I tried the solution, and many variations of it from: <a href="https://stackoverflow.com/questions/48705555/how-to-get-id-of-selected-value-in-mat-select-option-in-angular-5">How to get Id of selected value in Mat-Select Option in Angular 5</a>
  I also looked through Angular material documentation but it is a bit sparse on everything needed for this topic.</p>
  
  <p>Why is the specific selection not being recognized? </p>
  
  <p><strong>HTML</strong>:</p>
  
  <pre><code>&lt;mat-form-field class="right"&gt;
        &lt;mat-select&gt;
            &lt;mat-option *ngFor="let language of languages" [value]="language.value" (selectionChange)="doSomething($event.value)"&gt;
                {{language.viewValue}}
            &lt;/mat-option&gt;
      &lt;/mat-select&gt;
  &lt;/mat-form-field&gt;
  </code></pre>
  
  <p><strong>TypeScript</strong>:</p>
  
  <pre><code>doSomething(event) {
     //if value selected is spanish
     if(event.value == "es")
        this.routerService.navigate(['es/']);
  }
  </code></pre>