@cawa-93 do you mean the title property comes from a page?
If so, you should use the vuex store for that.
@Atinux, You do not recommend using your example to pass a value from a page to a layouts? Something like this:
layouts/default.vue
<template>
<h1>{{title}}</h1>
</nuxt>
</template>
<script>
export default {
computed: {
title () {
return this.$route.matched.map((r) => {
return (r.components.default.options ? r.components.default.options.pageTitle : r.components.default.pageTitle)
})[0]
},
},
}
</script>
pages/somePage.vue
export default {
pageTitle: 'Title for H1 tag'
}
Sure, you can do this too :+1:
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Sure, you can do this too :+1: