1

We can bind attributes with :

Like :id="single.id"

what I want is PHP equivalent of this

id="FixText<?php echo $single->id; ?>"

so in vue, how can I add text FixText before single.id ?

0

1 Answer 1

2

:id is equal to v-bind:id So when you are binding some values you can put any valid JS code there.

Put your string into template strings and It will work:

FixText${single.id}

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.