Skip to content

Instantly share code, notes, and snippets.

@mrofi
Created May 10, 2020 09:07
Show Gist options
  • Save mrofi/826009ba12b4a445ff9470c239ffd1ff to your computer and use it in GitHub Desktop.
Save mrofi/826009ba12b4a445ff9470c239ffd1ff to your computer and use it in GitHub Desktop.
Vue JS Snippet
<!-- Show Router Link -->
<li class="items-center text-gray-800 hover:text-gray-600"
v-for="route in this.$router.options.routes"
v-bind:key="route.path"
>
<router-link
class="text-xs uppercase py-3 font-bold block"
v-bind:to="route.path"
activeClass="text-orange-500 hover:text-orange-600"
v-bind:exact="route.path == '/'"
><i class="opacity-75 mr-2 text-sm" v-bind:class="route.meta.icon"></i>
{{ route.name }}
</router-link
>
</li>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment