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

123
Views
Dynamic routing of a dynamics components with Vue

I'm creating an app to manage certain maintenance by the user. I've created a component that displays all the data I've entered into an array of objects. My problem is how to redirect the user to a different page for each component they click (each page must have component data). To reinderize I passed the Vue syntax $ {maintenance.id} but without getting results.

<card-maintenance
          v-for="manutenzione in manutenzioni"
          :key="manutenzione.id"
          :name="manutenzione.nome"
          :data="manutenzione.data"
          :durata="manutenzione.durata"
        >
        <router-link :to="`manutenzione/${manutenzione.id }`">More details</router-link>
        </card-maintenance>

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

0

Vue is misinterpreting the javascript interpolation. Try like this:

<card-maintenance
          v-for="manutenzione in manutenzioni"
          :key="manutenzione.id"
          :name="manutenzione.nome"
          :data="manutenzione.data"
          :durata="manutenzione.durata"
        >
        <router-link :to="'manutenzione/' + manutenzione.id ">More details</router-link>
        </card-maintenance>


about 4 years ago · Juan Pablo Isaza Report

0


<template>
<router-link :to="`/manutenzione/${id}`"> 
  <div class="maitenanceItem">
    
    <div class="nameMaintenace">
      <p>{{ name }}</p>
    </div>
    <div class="dataMaintenance">
      <p>{{ data }}</p>
    </div>
    <div class="durataMaintenace">
      <p>{{ durata }}</p>
    </div>
       
  </div>
  </router-link>
</template>

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!