4

Why can't I use es6 template-string with vue.js v-bind:style

this works:

<div :style="{transform:'translate('+x+'px,'+y+'px)'}">

but this silently fail:

<div :style="{transform:`translate(${x}px,${y}px)`}">

(I'm of course aware with es6 browser compatibility an use browser supporting template string)

1 Answer 1

5

template string was not supported by vue.js, I open an issues, it will be fixed

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.