2

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.

1 Answer 1

2

Try

<router-link
      :to="`/patients/${this.user.id}/bookings/${booking.booking_id}`"
      class="stretched-link"
    ></router-link>
Sign up to request clarification or add additional context in comments.

2 Comments

oh god, this was the mistake... facepalm. Thank you so much!!
No worries. Please accept the answer if it solved your question.

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.