[Vuejs]-How do I pass data to the key and link of a link element?

0πŸ‘

βœ…

The answer above is right. You have to remmeber, that every property that written as usual <component link="some-link/object.id"></component> will not be parsed, but will be passed as string. So you have to use :link="'/bla/bla/'+object.id".

lowerBoss will be available inside f7 component as "data", because of :data="lowerBoss" this part of your tag.

Check this Vue.js Passing Static or Dynamic Props

To handle events you have to use vue.js directives Event handling

0πŸ‘

Try as below

  <f7-list-item v-for="lowerBoss in lowerBosses" :key="lowerBoss.id" :data="lowerBoss" class="single-boss subheading white" :link="'/boss/'+lowerBoss.id">
     {{ lowerBoss.name }} 
    </f7-list-item>

Leave a comment