vue-gallery
vue-gallery copied to clipboard
Gallery is broken when navigated to directly
I have a gallery on a page that works exactly as expected when navigated to from another page, i.e. open mypage.com, click gallery.
If I navigate directly to mypage.com/gallery, the gallery buttons are visible and unstyled, and clicking the images doesn't work.
Nothing appears in the console, and from the inspector it appears that the v-gallery isn't getting registered or something?
Functional, navigating from another page:
Broken, navigating directly:
I'm using in NuxtJS which generates a static site so I'm suspicious this is the issue:
Might be a dupe. Seems like this: https://github.com/RobinCK/vue-gallery/issues/3#issuecomment-335893257
Unfortunately setting ssr: false didn’t resolve it.
Encountering a similar issue If I navigate through links on the site it loads perfectly. If I go directly from the URL it breaks with the error 'SyntaxError Invalid or unexpected token'
In console I'm also seeing the same message @jtleniger is getting about server-rendered and client-side DOM tree not matching.