zhouzhuojie / meteor-vue

Vue for Meteor
130 stars 8 forks source link

Any idea how to use `pathFor` within `v-for` loop? #26

Open andregoldstein opened 8 years ago

andregoldstein commented 8 years ago

Hi guys,

I'm currently struggling to find a way of passing the _id property to my pathFor helper using Iron Router with Vue.

When not using Vue the pathFor tag would work without explicitly declaring the _id. eg:

href="{{pathFor 'adminClient'}}

However now we are using the v-for loop the _id is no longer automatically picked up. Perhaps because we use the v-for="person in people" syntax so Iron Router can't pick it up.

Has anyone found a way around this yet, other than creating the URL manually?

Thanks