I am using Vue 2.4.4 and Nuxt 1.0.0-rc11 in hash and spa mode.
When I try to load a page directly: http://localhost:3000/Gui/#/hud
My custom layout is not loaded. It always loads the default layout.
export default {
name: 'asc-hud',
layout: 'hud-layout',
...
}
If I go to the root, to allow the app to load first: http://localhost:3000/Gui/#/
And then go to my page: http://localhost:3000/Gui/#/hud
The correct layout is loaded.
If I refresh the browser while on my page, it reloads the app and uses the default layout instead of my custom layout.
Seems like a bug.
It's pretty straight forward, but I can provide more code and/or screenshots if necessary. Just let me know.
In the meantime, I've created a workaround by creating a dynamic route: http://localhost:3000/Gui/#/load/hud
And redirecting to the correct page from there. Then the app is loaded before the page is opened and the correct layout is used. Would rather not have to do this, though.
Thanks!
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This bug report is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1722">#c1722</a>)</em></sub></div>