Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

150
Views
javascript - concat a string to a variable

I have the following in a vue.js script:

<v-tab v-for="type in searchTypes" :id="type.value" :key="type.value" @click="getSelectValue(type.value)">

I want to append the id of "type.value" with a fixed string "_tab"

I have tried various ways without getting it to work. Any help is appreciated. thank you

about 4 years ago · Juan Pablo Isaza
3 answers
Answer question

0

You can use javascript expressions to contat the string like this:

<v-tab v-for="type in searchTypes" :id="type.value + '_tab'" :key="type.value" @click="getSelectValue(type.value)">

I hope this can help you here is the source:

Using JavaScript Expressions

about 4 years ago · Juan Pablo Isaza Report

0

You can use template literal syntax to do that. I'm a React guy, but I think this will work. Hopefully I understood the question correctly.

<v-tab v-for="type in searchTypes" :id="`_tab${type.value}`" :key="type.value" @click="getSelectValue(type.value)">
about 4 years ago · Juan Pablo Isaza Report

0

Just use string interpolation:

<v-tab v-for="type in searchTypes" :id="`${type.value}_tab`" :key="type.value" @click="getSelectValue(type.value)">

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!