title: How to create a custom input type?
body: <p>I would like to create a custom input type similar to the way AngularJS implements "email", for example.</p>
  
  <pre><code>&lt;input type="email" ng-model="user.email" /&gt;
  </code></pre>
  
  <p>What I would like to create is an input type like this:</p>
  
  <pre><code>&lt;input type="path" ng-model="page.path" /&gt;
  </code></pre>
  
  <p>Any ideas on how this can be accomplished? So far, I've only been able to figure out how to implement custom directives where 'path' is the name of the tag, attribute or class.  </p>
  
  <p>For example, I can get this to work but it is <strong>inconsistent</strong> with the other form fields and I'd really like them to look the same.</p>
  
  <pre><code>&lt;input type="text" ng-model="page.path" path /&gt;
  </code></pre>
  
  
  
  <pre><code>app.directive('path', function() {
    return {
      require: 'ngModel',
      link: function(scope, elm, attrs, ctrl) { ... }
    };
  });
  </code></pre>