title: Focus on an input after creating it with AngularJS
body: <p>I've been doing a todo list with AngularJS and want to know if there's a way to focus on a input box after creating it by clicking on a button.</p>
  
  <p>Actually, my save function inside the controller is defined like this:</p>
  
  <pre><code>$scope.save = function() {
      $scope.objetivo.$save()
          .then(function() {
            $scope.message = {
              text : 'Saved'
            };
            $scope.objective = new Objective();
          })
          .catch(function(err) {
            console.log(err.data);
            if(err.data.code === 11000) {
              text = 'This objective is already registered'
            }
            $scope.message = {
              text : text || "Error when saving"
            };
          });
      };
  </code></pre>
  
  <p>I think there's might be a way by adding the input box and then focusing on it, but I don't know how to do it.</p>