title: Angular2 Dropdown revert to previously selected option
body: <p>I have this simple HTML select to implement dropdown in Angular2 (TS) as shown below </p>
  
  <pre><code>&lt;select id="pageSize" (change)="onPageSizeChanged($event, pagination.pageSize)"&gt;
    &lt;option value="10"&gt;10&lt;/option&gt;
    &lt;option value="20"&gt;20&lt;/option&gt;
    &lt;option value="50"&gt;50&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>The previously selected value is kept in <code>pagination.pageSize</code> variable. And on change of this I wanted to open a dialog box and wait for users response. If user, clicks cancel I want to revert the selection to the previously selected options.</p>
  
  <pre><code>onPageSizeChanged(event, oldValue) {
    const response = window.confirm("Are you sure you want change the page size? Your edits will be lost?");
    if (response) {
      //... some code ...
    } else {
      //... here I want to revert the selection to previously selected option
    }
  }
  </code></pre>
  
  <p>Tried lot of different things but of no luck.</p>
  
  <p>Please help, I am loosing my mind over this simple thing. I must be doing something stupid.</p>
  
  <hr>
  
  <p>Tries #1 - Didn't work (Plunk - <a href="https://embed.plnkr.co/ILi12O/" rel="nofollow noreferrer">https://embed.plnkr.co/ILi12O/</a>)</p>
  
  <pre><code>&lt;select id="pageSize" [ngModel]="pageSize" (ngModelChange)="onPageSizeChanged($event, pagination.pageSize)"&gt; 
    &lt;option value="10"&gt;10&lt;/option&gt; 
    &lt;option value="20"&gt;20&lt;/option&gt; 
    &lt;option value="50"&gt;50&lt;/option&gt; 
  &lt;/select&gt; 
  
  onPageSizeChanged(event, oldValue) { 
    const response = window.confirm("Are you sure you want change the page size? Your edits will be lost?"); 
    if (response) { //go ahead so something } 
    else { this.pageSize = oldValue; }  
  } 
  </code></pre>