dustbuster
dustbuster

Reputation: 82152

What do the hash marks (#) mean in Vue?

I rather new to Vue, and cannot figure out exactly what the hash symbol # (i.e. #item.active) means in Vue.

As the hash symbol is a difficult term to search on the web!

<template #item.active="{ value }">
  <div :aria-label="String(value)" class="text-center">
    <v-icon v-if="value === null">mdi-minus</v-icon>
    <v-icon v-else color="red">mdi-close</v-icon>
  </div>
</template>

Thank you in advance for any help!

Upvotes: 28

Views: 9256

Answers (1)

Edric
Edric

Reputation: 26750

As mentioned in the comments, the # symbol is a shorthand for the v-slot attribute, as hinted by the usage of <template> (which v-slot only allows to be used on, as well as components) in your code.

Upvotes: 32

Related Questions