Question · Vue.js course · Module 2: Template Syntax
Style Binding - Object Syntax
How do you dynamically set text color in Vue?
Answer options
- style="color: {{ color }}"
- v-style="color: activeColor"
- :style="{ color: activeColor }"
- css="{ color: activeColor }"
Show the answer
Correct answer:
- :style="{ color: activeColor }"