Closed apertureless closed 8 years ago
Hi,
is it possible to set a directive on a condition?
I have a "sticky" directive to make elements sticky on the screen. And I have a social share component where I am using it
<tempalte> <div class="social-share" v-sticky> .... </div> </template>
However, now I need a condition. I would love making this over a prop.
<social-share :is-sticky="true">
Is there an easy way to add the directive?
ok got it working over directive params. And added the condition in the directive itself.
Hi,
is it possible to set a directive on a condition?
I have a "sticky" directive to make elements sticky on the screen. And I have a social share component where I am using it
However, now I need a condition. I would love making this over a prop.
Is there an easy way to add the directive?