title: How to click a button and focus on another input in angularjs?
body: <p>I don't know how to focus on an input when clicking on a button in angularjs.</p>
  
  <p>I create a simple demo which can't work here: <a href="http://plnkr.co/edit/NS0jJE9ttakNm8nc6QkZ?p=preview" rel="nofollow">http://plnkr.co/edit/NS0jJE9ttakNm8nc6QkZ?p=preview</a></p>
  
  <p>This is the main code:</p>
  
  <pre><code>app.controller('MainCtrl', function($scope, $element) {
    $scope.name = 'World';
    $scope.myfocus = function(){
      $element.find("#myinput").???? // what to do here?
    }
  });
  </code></pre>