title: How to set the cursor focus on input field?
body: <p>I would like to set the cursor focus on an input field as soon as the form (directive) is shown. I tried adding the following code to my link function:</p>
  
  <pre><code>link: function (scope, element, attrs) {
      element('input[name=headline]').focus();
  }
  </code></pre>
  
  <p>But it does not work. I also tried the following variants:</p>
  
  <pre><code>element.find('input[name=headline]').focus();
  element.querySelector('input[name=headline]').focus();
  </code></pre>
  
  <p>I did not find any useful information on the Web. <code>md-autofocus</code> seems to have nothing to do with what I am trying to achieve.</p>