[Vuejs]-How to implement a sidebar that is bound to the route in nuxtjs

0👍

Nuxt.js does support named views. They are referenced as layouts in documentation and serve exactly that purpose.

It is possible to create multiple layouts in layouts folder and specify them for each page as following:

<template>
  <!-- Your template -->
</template>
<script>
  export default {
    layout: 'sidebar'
    // page component definitions
  }
</script>

Leave a comment