pllaguno
1 month ago
210
7
Vue

getting route to work with Vue

Posted 1 month ago by pllaguno

i have a component inside another component. That component needs to have a button with a link to it. i am having a difficult time into getting it to work.

so in my blade file i got my component like this

<inscripcion-table route={{route('comercial.integracion.create')}}></inscripcion-table>   

and my inscripcion component has props like this and the passes it to the other component.

props:[
    'route'
  ],

<filter-bar route="this.route"></filter-bar>

where the button is suposed to work i have it like this

<button class="btn btn-secondary" @click.prevent="createNew(this.route)">Nuevo Expediente</button>

createNew: function (route){
        console.log(route);
        // window.location.href = route
      },

Please sign in or create an account to participate in this conversation.