Routing

Routing

StrikingDash use vue-router as base routing system. To add a new route in the template, you can follow the steps below.

Create new route

We place all our pre and post login page components in src/routes/ folder. authRoutes.js file is for authentication and adminRoutes.js contains all admin panel routes.
protectedRoute.js in this folder is the entry point of all pages, you can basically set your pages in this file.

Refer below mentioned code to create a route:


import Apps from './Applications';

const admin = [
  {
    path: '',
    name: 'dashboard',
    component: () => import(/* webpackChunkName: "Dashboard" */ '@/view/dashboard/Dashboard.vue'),
    children: [
      {
        path: '',
        name: 'home',
        component: () => import(/* webpackChunkName: "Home" */ '@/view/dashboard'),
      },
    ],
  },
  ...Apps,
];

export default admin;