title: How to simulate a tab keypress with angular
body: <p>I'm interested in doing a very simple auto tabbing function.  I'd like to programmatically press "tab" for the visitor.  I can't seem to figure out how to accomplish this in standard JS (ie - not using jQuery's <code>.trigger()</code>).</p>
  
  <p>Usage: <code>&lt;input auto-tab="3"&gt;</code></p>
  
  <pre><code>directive('autoTab', [function () {
          return {
              restrict: "A",
              scope: false,
              link: function (scope, el, attrs) {
                  el.bind('keyup', function () {
                      if (el.val().length &gt;= attrs.autoTab) {
                          //document.dispatchEvent();
                      }
                  });
              }
          }
      }])
  </code></pre>