title: Vue.js - repeat an element a specific number of times
body: <p>I would like to use Vue.js to repeat an element n times, based on the <code>num-labels</code> prop.</p>
  
  <pre><code>&lt;label-parent num-labels="4"&gt;&lt;/label-parent&gt;
  </code></pre>
  
  <p>This is my component:</p>
  
  <pre><code>&lt;template&gt;
    &lt;div id="label-parent"&gt;
      &lt;div v-for="idx in numLabels"&gt;
        {{idx}}
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;;
  export default {
    name: "LabelParent",
    props: ['numLabels'],
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>This code only outputs an empty div: <code>&lt;div id="label-parent"&gt;&lt;/div&gt;</code>. What is the correct way of doing this?</p>