In vue 1 I was doing this: v-bind:class='{"isdanger": invalidLogin}'
.
Now I'm trying to do the same in a Vue 2 app but I'm getting this error:
template syntax error - invalid expression: v-bind:class="{'isdanger': invalidLogin}"
I'm using pug
, just in case.
Any ideas?
Sigh, I changed it to double quotes like this: v-bind:class="{'is-danger': true}"
and now it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With