In my Vue.js application, I am currently rendering it using different pages. A problem I'm facing is that when I log in for the first time, it only renders the main component of the page according to vue router. I want the login function to execute and then redirect to /dashboard
. However, I need a way to reload my App.vue file or somehow refresh the header and sidebar in the following code. Currently, the header and sidebar are not displayed when on /login
, so using router.push('/dashboard')
leads to everything except the header and sidebar being rendered.
<Header />
<Sidebar v-if="!pageOptions.pageWithoutSidebar" />
<div id="content" class="content" v-bind:class="{ 'content-full-width': pageOptions.pageContentFullWidth, 'content-inverse-mode': pageOptions.pageContentInverseMode }">
<router-view></router-view>
</div>