[Vuejs]-My custom vue directive in a .vue file is not executing

0πŸ‘

βœ…

To ensure compliance with naming standards (have a - dash in the name) and to avoid conflicts, by default, all directives registered by Vue are automatically prefixed with v-.

So change the markup to <div v-my-test>...</div>. See it working.

Leave a comment