What is the correct way to add custom href to each link in the list?
For example, i want that link: 'News' would have href="http://example.com/news".
Is there a possible way to do something like that:
{ link: 'News', href: 'http://example.com/news' }
And render it like that:
<a v-bind:href="{{ a.href }}" v-bind:class="[foot]" v-for="a in news">{{ a.link }}</a>
What i have:
JS
var footer = new Vue({
el: '.footer',
data: {
foot: 'footmenu',
news: [
{ link: 'News', },
{ link: 'Latest' },
{ link: 'Business news' },
// etc
],
business: [
{ link: 'Vets' },
{ link: 'Companion animal' },
{ link: 'Equine' },
// etc
],
// etc
});
HTML
<a v-bind:class="[foot]" v-for="a in news">{{ a.link }}</a>