Routing with Vue Router

Vue Router ( is the official Vue.js router and we use it for client-side routing. The default setup with JHipster is to use browser history-based routing (HTML5 pushState). It supports component-based routing, along with an API for advanced routing setups. Routes are defined centrally using the Router object.

Let's take a look at src/main/webapp/app/router/index.ts:

Vue.use(Router);export default new Router({  mode: 'history',  routes: [    {      path: '/',      name: 'Home',      component: Home    },    {      path: '/forbidden',      name: 'Forbidden',      component: Error,      meta: { error403: true }    },    {      path: '/not-found',      name: 'NotFound',      component: Error,      meta: { error404: true }    },    {      path: '/register', name: 'Register', ...

Get Full Stack Development with JHipster - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.