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

245
Views
Vue: two params in url not loading correct route

Comunity

I have a list of bookings (component: BookingListItem), which I render in my component "BookingView". Now I want to show the booking details when I click on one of these booking items. For this, I created a streched link, like that:

<router-link
      :to="`patients/${this.user.id}/bookings/${booking.booking_id}`"
      class="stretched-link"
    ></router-link>

I need the userid and the bookingid to make an api call from the ReadBookingView component (in this component the bookingdetails are displayed).

In my router.js file I defined the route like that:

    {
      path: "/patients/:userid/bookings/:bookingid",
      name: "readbooking",
      component: ReadBookingView,
    },

But when I load my BookingView component the following warnings are showed: enter image description here There the userid and the bookingid are correct. But when I click on one of my booking items the following link is opened: http://URL:8081/4328

I hope y'all understand my explanation. Cause I don't understand why it's not loading correcty and I am very grateful for all your inputs.

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

0

Try

<router-link
      :to="`/patients/${this.user.id}/bookings/${booking.booking_id}`"
      class="stretched-link"
    ></router-link>
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!