Reputation: 57
json format
{ "font_color": "red", }
I received the color with json and I want to apply it to the html immediately.
<h2 style="color:{{msg.font_color}}">Test</h2>
Upvotes: 2
Views: 25
Reputation: 54
<h2 v-bind:style="{ color: `${msg.font_color}` }">Test</h2>
Upvotes: 3