vijay.rangan
1822
17
Vue

Props without values (think attributes) in Vuejs

Posted 3 years ago by vijay.rangan

Hey guys,

I was wondering if it's possible to do something like this in Vue

<div spacer>
</div>

That would achieve the same result as

<div :spacer="true">
</div>

So basically I need to know if we can have attribute like syntax in Vue where we can detect the usage / presence of a prop instead of having verbose syntax like above.

Any help is much appreciated !

Thanks in advance :)

Please sign in or create an account to participate in this conversation.