My routing for my site works fine but the problem arises when I hit the refresh button.
On a base route for example http://localhost:8080/employers
the page or component style remains the same but when I refresh a child route for example http://localhost:8080/employers/google
all the style for this component will be lost.
Any help on how to resolve this problem will be appreciated
import Vue from 'vue' import Router from 'vue-router' // import store from './store.js' Vue.use(Router) const router = new Router({ mode: 'history', base: process.env.BASE_URL, routes: [ { path: '/', component: () => import('./views/Home.vue'), children: [ { path: "", component: () => import("./views/HomePage.vue"), }, { path: '/jobs', name: 'jobs', component: () => import('./views/JobListings.vue') }, { path: '/job/:id', name: 'job', component: () => import('./views/JobDetails.vue') }, { path: '/login', name: 'login', component: () => import('./views/Login.vue') }, { path: '/register', name: 'register', component: () => import('./views/Register.vue') }, { path: '/forgotpassword', name: 'forgotpassword', component: () => import('./views/ForgotPassword.vue') }, { path: '/verify', name: 'verify', component: () => import('./views/Verify.vue') }, ], }, { path: '/employer', component: () => import('@/views/Employers.vue'), children: [ { path: '', component: () => import('./views/Employers/Profile.vue') }, { path: 'profile', component: () => import('./views/Employers/Profile.vue') }, { path: 'post', component: () => import('./views/Employers/PostJob.vue') }, { path: 'listings', component: () => import('./views/Employers/Listings.vue') }, { path: 'settings', component: () => import('./views/Employers/Listings.vue') }, { path: 'editresume', component: () => import('./views/Employers/Listings.vue') }, { path: 'closeaccount', component: () => import('./views/Employers/Listings.vue') }, ] }, // jobseekers route { path: '/jobseeker', component: () => import('@/views/Jobseekers/Home.vue'), children: [ { path: '', component: () => import('@/views/Jobseekers/Profile.vue') }, { path: 'resume', component: () => import('@/views/Jobseekers/Resume.vue') }, { path: 'profile', component: () => import('@/views/Jobseekers/Profile.vue') }, { path: 'settings', component: () => import('@/views/Jobseekers/Settings.vue') }, { path: 'applications', component: () => import('@/views/Jobseekers/Applications.vue') }, { path: 'close', component: () => import('@/views/Jobseekers/Close.vue') }, ] }, { path: '/jobseeker/:page', component: () => import('@/views/Jobseekers/Profile.vue'), }, { path: '/search/:region/:keyword', component: () => import('./views/JobListings.vue') }, // not found route { path: '*', name: '404', component: () => import('./views/404.vue') } ] }) export default router