N
N
Nikolay Semenov2017-08-16 13:17:39
JavaScript
Nikolay Semenov, 2017-08-16 13:17:39

How to substitute a class for an element based on a value in Vue?

Hello!
Guys, tell me how to make a class substitution in an element if the value is true and remove if false&

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Kulakov, 2017-08-16
@nickola105

<div :class="[isNeeded ? 'needed' : false]"></div>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question