Vue component props without value : <p>I want to set an attribute on my component without any value. For example:</p>

<pre><code>&lt;my-button primary&gt;Save&lt;/my-button&gt;
</code></pre>

<p>I'm declaring <code>primary</code> in <code>props</code> of my component:</p>

<pre><code>Vue.component("my-button", {
  props: ["primary"],
  template: "&lt;button v-bind:class='{primary: primary}'&gt;&lt;slot&gt;&lt;/slot&gt;&lt;/button&gt;"
})
</code></pre>

<p>Unfortunately, it doesn't work. The <code>primary</code> property is <code>undefined</code> and the class is not applied.</p>

<p>JSFiddle: <a href="https://jsfiddle.net/LukaszWiktor/g3jkscna/" rel="noreferrer">https://jsfiddle.net/LukaszWiktor/g3jkscna/</a></p>
