Reputation: 1074
My component template vue.js file reports me some quote errors:
The line with this code: :state="validateState('form.name')"
And the line with this code: :state="validateState('form.foods')"
How fix this for a Vue.js template?, this solution: :state="validateState("form.name")" not works for me
Upvotes: 0
Views: 2002
Reputation: 691
if you are using single quotes anywhere, you cant use single quotes again inside there.
use template literals or care about single-double quotes.
Upvotes: 0
Reputation: 4257
The issue is from you using single quotes to declare your template.
template: '...'
I would suggest using the template literals and you don't need to include backslashes for end lines and such.
template: `...`
The other option you have is escaping the following single quote
template: '\'somestring\''
Upvotes: 3