title: Mapping component attributes without a value
body: <p>I am after providing a property for my Angular component. By property I mean a toggle-style boolean attribute that you put in HTML without specifying the attribute's value:</p>
  
  <p></p>
  
  <p>as opposed to an input (this is not what I want):</p>
  
  <p></p>
  
  <p>If <code>compact</code> is present then the component should coerce its value it to a boolean:</p>
  
  <ol>
  <li><code>&lt;my-component compact="compact"&gt;</code> // &lt;= true</li>
  <li><code>&lt;my-component compact="true&gt;</code> // &lt;= true</li>
  <li><code>&lt;my-component compact="false"&gt;</code> // &lt;= true?</li>
  </ol>
  
  <p>If <code>compact</code> has no value then it maps to true:</p>
  
  <ol start="4">
  <li><code>&lt;my-component compact&gt;</code> // &lt;= true</li>
  </ol>
  
  <p>If <code>compact</code> is missing out:</p>
  
  <ol start="5">
  <li><code>&lt;my-component&gt;</code> // &lt;= false</li>
  </ol>
  
  <p>However when I leave it without an attribute value, the component sees null, so I am not able to distinguish between case #4 and #5, even if I provide a default value within constructor.</p>
  
  <pre><code>  constructor(
      @Attribute('compact') public compact,
    ) {
      console.log(this.compact) // `null` for &lt;my-component compact&gt;
    }
  </code></pre>
  
  <p>How should I go about it? Is Attribute decorator alone capable</p>