title: How to focus an input using Angular JS
body: <p>Using AngularJS how can I focus a text input from a controller?</p>
  
  <p>I have tried using the following:</p>
  
  <pre><code>$scope.myinput.focus();
  </code></pre>
  
  <p>This throws an error:
  "undefined' is not an object (evaluating '$scope.myinput.focus')"</p>
  
  <p>The basic situation is to trigger a focus of the input from clicking on another element. Ive created a <a href="http://jsfiddle.net/mh33X/1/" rel="nofollow">fiddle</a> to show the problem.</p>
  
  <p>Note: I am not interested in jquery solutions.</p>
  
  <p>Thanks for your help.</p>