Probably this is TOO basic - but nowadays I'm all kinda noob. I'm studying VueJS and I'm stuck in one problem.
I have this <h3> and its style is binded to a Vue Object.
<h3 :style="headerStyleP2" class="p2 font-ranchers col-xs-6 col-sm-12">
P2
</h3>
And here's the Vue object....
var notas = new Vue({
el: '#notas',
data: {
obs1: "Digite a nota da P1",
obs2: "",
obs3: "",
input1: "",
input2: "",
input3: "",
inputStyle: {
color: "white"
},
headerStyleP2: {
color: this.input1 ? "blue" : "grey"
},
headerStyleP3: {
color: "aqua"
}
}
})
So there you guys can see that I'm using a ternary. It's kinda working - but it's not being dynamic. When I refresh the page it's grey - but it never turns blue when I change the input1 value. (it's binded to another input - this one is working great.)
I'm felling I'm doing this the wrong way. How can I make it work?
