title: Alphabetical sorting for dropdown
body: <p>I just started working with Angular 2 and TypeScript. I'm having hard time with implementing code for it.</p>
  <p>My question is how to do sorting option in my dropdown list?</p>
  <p><strong>Here is HTML code:</strong></p>
  <pre><code>&lt;div class=&quot;col-12&quot;&gt;
      &lt;select class=&quot;form-control&quot; id=&quot;type&quot; [(ngModel)]=&quot;measure&quot; (change)=&quot;getMeasures()&quot;&gt;
          &lt;option *ngFor=&quot;let option of options&quot; [ngValue]=&quot;option.measure&quot;&gt;{{option.display}}&lt;/option&gt;
        &lt;/select&gt;
    &lt;/div&gt;
  </code></pre>
  <p>Here is the part of my TypeScript for options:</p>
  <pre><code>    options = [
          {
            measure: 'length',
            display: 'Length'
          },
          {
            measure: 'area',
            display: 'Area'
          },
          {
            measure: 'volume',
            display: 'volume'
          },
          {
            measure: 'time',
            display: 'Time'
          },
          {
            measure: 'current',
            display: 'Current'
          },
          {
            measure: 'energy',
            display: 'Energy'
          },
          
    ]
  </code></pre>