0

I have Tab.vue which I pass an object of tab data (linked to vue-router). I would like to pass exact when required, and append this attribute to the template if it exists

<tab :tabs="[{ text: 'Tab 1', route: 'home.tab1', exact: true }, { text: 'Tab 2', route: 'home.tab2' }]"></tab>

and in Tab.vue

<router-link v-for="item in tabs" :to="{ name: item.route }" item.exact?>
    {{ item.text }}
</router-link>

1 Answer 1

1
<router-link v-for="item in tabs" :to="{ name: item.route }" :exact="item.exact">
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.