Reputation: 2976
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?
Upvotes: 5
Views: 869
Reputation: 2976
Sigh, I changed it to double quotes like this: v-bind:class="{'is-danger': true}"
and now it works.
Upvotes: 9