title: Check existence of attribute in AngularJs Directive
body: <p>Is is possible to check whether a given attribute is present in a directive, ideally using isolate scope or in a worst case scenario the attributes object.</p>
  
  <p>With a directive that looked something like this <code>&lt;project status&gt;&lt;/project&gt;</code>, I want to conditionally render a status icon, but only if the status attribute is present.</p>
  
  <pre><code>return {
    restrict: 'AE',
    scope: {
      status: '@'
    },
    link: function(scope, element, attrs) {
      scope.status === 'undefined'
    }
  }
  </code></pre>
  
  <p>Ideally, it would be bound straight to the scope, so that it could be used in the template. However, the bound variable's value is <strong>undefined</strong>. The same goes for <code>&amp;</code> <strong>read-only</strong> and <code>=</code> <strong>two-way</strong> bindings.</p>
  
  <p>I know that it's trivially solved by adding a <code>&lt;project status='true'&gt;&lt;/project&gt;</code>, but for directives that I will use frequently, I'd rather not have to. (XHTML validity, is not an issue).</p>