title: How do I retrieve an element id vue js
body: <p>How can I get the id of an element in vue js? The items are using v-for from the youtube data api.</p>
  
  <pre><code>&lt;v-card v-for="video in videos" :key="video.snippet.resourceId.videoId"&gt;
    &lt;v-img
      :src="video.snippet.thumbnails.high.url"
      :id="video.snippet.resourceId.videoId"
      :lazy-src="`https://picsum.photos/10/6?image=${2 * 5 + 10}`"
      @click="renderVideo(id)"
    &gt;&lt;/v-img&gt;
  &lt;/v-card&gt;
  
  renderVideo(id) {
    console.log(this.$attrs["id"]);
  }
  </code></pre>
  
  <p>Any help much appreciated!</p>