Home

Issue: 2294

Looping Routes

[issue link]

I’m sorry I can’t seem to find an example that shows us how to loop through different levels in the page directory and use loop to produce a set of links.

For e.g. My directory structure:

Pages
  > index.vue
  > about.vue
  > contact.vue

Is there a way I could have:
<nuxt-link for="route in routes" to="route.path">route.name</nuxt-link>
to output all the links in the navigation as such?

<nuxt-link to="/">index</nuxt-link>
<nuxt-link to="/about">About</nuxt-link>
<nuxt-link to="/contact">Contact</nuxt-link>
This question is available on Nuxt.js community (#c2007)