Pass variable to router-link


I’m trying to pass a variable as the second argument to router-link as below, but it doesn’t work

<ion-item-sliding v-for='(debt, index) in listDebt' :key='' class="ion-list-padding">
    <ion-item class="myItem">
      <ion-label><b>{{ }} (RM{{ }}) {{}}</b>
    <ion-item-options side="end">
      <ion-item-option router-link="/debtAddEdit/edit/{{ }}">edit</ion-item-option>
      <ion-item-option color="danger">remove</ion-item-option>

that is, {{ }} wasn’t being resolved at all, seems like ionic/vue doesn’t treat it as a variable, instead it was treated as a text.

This should work for you.