title: angular2 - reference <input> template reference variable in component to change value property
body: <p>How do I access the value property of an  element in the component in Angular2?</p>
  
  <p><strong>In the Template:</strong></p>
  
  <pre><code>&lt;input #myInput (keyup.enter)="onInput(myInput)"/&gt; 
  </code></pre>
  
  <p><strong>In the Component code:</strong></p>
  
  <pre><code>import {ElementRef} from '@angular/core';
  ...
  onInput(latLngInputElement: ElementRef) {
    // I want to access the value property of the &lt;input&gt; element here, and
    // modify it so that it is reflected back in the template.
  </code></pre>
  
  <p>I know that I can pass the myInput.value into the code, but I need the reference so that I can  also use the function to update the .value property of the  element. </p>
  
  <p>I'd like to know if there is a way to do this that does not involve two way binding to a global variable, because I think it is cleaner to have as few globals as possible.  Thanks!</p>