[Vuejs]-How to pass params into method call from within vue js template?

0๐Ÿ‘

I think you should change:

<a :href="[[ item.mongo_link ]]/[[stage.name]]">

to

<a :href="`${item.mongo_link}/${stage.name}`">

0๐Ÿ‘

A bit cleaner way is using methods

methods: {
    generateMongoLink(item) {
     return item.mongo_link + '/' + stage.name"
   }
 }

Then in template

<a :href="generateMongoLink(item)">

Leave a comment