Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

200
Vistas
How to open this route in new window?
if (success) {
          context.bookingData.city = context.city;
          context.bookingData.departureFlightDate = context.departureFlightDate;
          context.bookingData.arrivalFlightDate = context.arrivalFlightDate;
          context.bookingData.idParkingService = context.idParkingService;
          context.bookingData.Price = context.bookings.price.items.data.price;

          //const booking = JSON.stringify(context.bookingData);
          context.addBookingData(context.bookingData);
          context.$router.push({
            path: "parkplatz-buchen-schritt-2",
          });
        }

how to open this path in new window or tab at the same time I have to pass context data to the destination

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

To open the route in a new window

Home.vue

<template>
 <button v-on:click="openInNewWindow()">Open in new window</button>
</template>

<script>

export default {
  methods: {
    openInNewWindow(){
      let routeData = this.$router.resolve({
        path: '/about',
        query: {
          city : 'test',
          departureFlightDate : 'test',
          arrivalFlightDate : 'test',
          idParkingService : 'test',
          price : 'test'
        }
      });
      window.open(routeData.href, '_blank');
    }
  }
}
</script>

Router

import Home from '../views/Home.vue'
import About from '../views/About.vue'


const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/about',
    name: 'About',
    component: About
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router

About.vue

<template>
  <div class="about">
    <h1>This is an about page</h1>
    {{this.$route.query.city}}
  </div>
</template>

<script>
export default {
  mounted(){
    console.log(this.$route.query)
  }
}
</script>
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda