[Vuejs]-How to call computed props dynamically on templates?

0👍

Inside template, this is completely option. You can use computed properties and other state variables/methods using one of the following ways:

<template>
   <div>
       <span v-if="something === 'foo'"> Computed property called dynamically </span>
   </div>
</template>

or

<template>
   <div>
       <span v-if="this.something === 'foo'"> Computed property called dynamically </span>
   </div>
</template>

Leave a comment