Skip to main content
Category:

Code snippet that can be used  to make router-link to path with params in Vuejs.

Example 1:

 <router-link :to="{ name:'users', params: { user_id: user.id }">
    {{user.name}}
  </router-link>

 

Example 2:

<router-link :to="'/articles/'+ article.id +'/edit'" tag="button" v-if="isRole('admin')" class="btn btn-success btn-sm mr-1">
                <i class="far fa-edit"></i>
 </router-link>

Riadh Rahmi

Senior Web Developer PHP/Drupal & Laravel

I am a senior web developer, I have experience in planning and developing large scale dynamic web solutions especially in Drupal & Laravel.

Web Posts

Search

Page Facebook