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

334
Vistas
router-link not working on datatable vue3

I am new on Vue3. I am using datatable on Vue3, but router-link is not working there. I want a Button where i can go another page without refreshing. I know that i can achieve this with "router-link". But i cant find any solution how tou use "router-link" on datatable. Here is my code:

   methods:{
getCategories()
    {
     axios
    .get("http://localhost/listagram-vue/api/categories")
    .then((response)=>
    {
      $('#example').DataTable({
            responsive: true,
          data:response.data,
          columns:[
                {
                    data: 'id',
                    name: 'id',
                },
                {
                    data: 'name',
                    name: 'name'
                },
                {
                    data: 'parent_id',
                    defaultContent: 'parent_id'
                },
                {
                    data: 'status',
                    name: 'status'
                },
                {
                data: 'action',
                className: "dt-center editor-edit",
                defaultContent: ' <router-link to="/categories/create" class="btn btn-primary btn-sm">EDIT</router-link>|<button class="btn btn-danger btn-sm" onclick="return confirm(\'Are you sure?\')">Delete</button>',
                orderable: false
                }
            ]
      });
    })
    }
    }

Now my question is how to make work this router-link?

about 4 years ago · Juan Pablo Isaza
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