title: Set an input focus active after toggle ng-show
body: <p>I don't get how I can focus the input after it appears with ng-show / ng-hide. I'm using a button with <code>ng-click="showme=!showme"</code> to show and hide my input. Any tips?</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div ng-app=""&gt;  
    &lt;button ng-click="showme=!showme"&gt;SHOW/HIDE&lt;/button&gt; 
    &lt;div class="wrapper"&gt;
      &lt;p ng-hide="showme"&gt;It will appear here!&lt;/p&gt;
      &lt;input ng-show="showme" type="text" name="s" placeholder="Search..." /&gt;
    &lt;/div&gt; 
  &lt;/div&gt; 
  </code></pre>
  
  <p><a href="https://jsfiddle.net/t766muL8/" rel="nofollow noreferrer">JFiddle</a>   </p>
  
  <p>I tryed using what is suggested <a href="https://stackoverflow.com/questions/14833326/how-to-set-focus-on-input-field">here</a>, but it doesn't work.</p>
  
  <p><a href="https://jsfiddle.net/t766muL8/1/" rel="nofollow noreferrer">JFiddle</a></p>
  
  <p>I also tryed the autofocus directive, but it still doesn't work.</p>