I have tried 2 approaches. Both work, but none satisfy me:
First approach, I
setRoot to a
root.html only contains a
<router-view>. Login / register / whatever is loaded there.
After logging in,
app.html will be loaded into that
app.html, I have navbar, sidebar, footer, a
<router-view> for breadcrumb, and another
<router-view> for subpages.
Pros: easy to wrap our head around, I guess…
Cons: all my authenticated routes are prepended with
/app/, which is not too terrible but annoying
Second approach, I
setRoot directly to
app.html contains everything like above (navbar, sidebar, footer, and 2
<router-view>'s), but only the main is visible until user has logged in.
Pros: simple structure, no prepended route
Cons: uhm, my navbar et al. showed up fractions of a second before the login screen is replaced with the authenticated home screen, which is not too terrible but also annoying