title: Name conventions in angualrjs directives
body: <p>This works for me (server-side validation example):</p>
  
  <p><a href="https://stackoverflow.com/questions/12864887/angularjs-integrating-with-server-side-validation">AngularJS: integrating with server-side validation</a></p>
  
  <p>But, I decided to ask additional question.</p>
  
  <p>In that example we use <strong>unique-email</strong> directive:</p>
  
  <pre><code>&lt;input type="email" ng-model="userEmail" name="userEmail" required unique-email/&gt;
  </code></pre>
  
  <p>But when creating the directive, we use <strong>uniqueEmail</strong>:</p>
  
  <pre><code>app.directive('uniqueEmail', function($http) { ..
  </code></pre>
  
  <p>Why? Is it related somehow to name conventions / rules in names? How does angular know where to look and how to connect one to another?</p>
  
  <p>I just wonder because when I used <code>&lt;input ... required uniqueEmail</code> it does not work. Until I typed "unique-email"</p>
  
  <p>Same if I type:</p>
  
  <pre><code>app.directive('unique-email', function($http) {
  </code></pre>
  
  <p>It will not work until I type <code>uniqueEmail</code></p>
  
  <p>So there is no chance to use one style name when use directive and when define it.</p>