title: How to set focus on input field?
body: <p>What is the 'Angular way' to set focus on input field in AngularJS?</p>
  <p>More specific requirements:</p>
  <ol>
  <li>When a <a href="http://angular-ui.github.com/bootstrap/#modal" rel="nofollow noreferrer">Modal</a> is opened, set focus on a predefined <code>&lt;input&gt;</code> inside this Modal.</li>
  <li>Every time <code>&lt;input&gt;</code> becomes visible (e.g. by clicking some button), set focus on it.</li>
  </ol>
  <p><a href="http://plnkr.co/edit/XL1NP0?p=preview" rel="nofollow noreferrer">I tried to achieve the first requirement</a> with <code>autofocus</code>, but this works only when the Modal is opened for the first time, and only in certain browsers (e.g. in Firefox it doesn't work).</p>