Skip to content

Instantly share code, notes, and snippets.

@mjgartendev
Created May 25, 2018 04:38
Show Gist options
  • Save mjgartendev/6a3ce08d7af499972b2b86cf043a254b to your computer and use it in GitHub Desktop.
Save mjgartendev/6a3ce08d7af499972b2b86cf043a254b to your computer and use it in GitHub Desktop.
An example Nuxt Layout component commented from the Nuxt documentation
<template>
<div>
<!-- nuxt
For Layouts:
<nuxt> component is used only in layouts to display the page components.
Props:
nuxtChildKey: string
This prop will be set to <router-view/>, useful to make transitions inside a dynamic page and different route.
Default: $route.fullPath
Example (layouts/default.vue):-->
<div>My nav bar</div>
<nuxt/>
<div>My footer</div>
</div>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment