seepur/resources/scripts/applications/home/router/router.vue

42 lines
722 B
Vue
Raw Normal View History

2020-02-02 22:42:18 +00:00
<script lang="ts">
import Vue from "vue";
import VueRouter, {
RouteConfig,
RouterOptions,
RouterMode,
NavigationGuard
} from "vue-router";
Vue.use(VueRouter);
// Views
import Home from "../views/home.vue";
import Settings from "../views/settings.vue";
import Applications from "../views/application.vue";
const routes: RouteConfig[] = [
/** Define Application Routes */
{
path: "/",
component: Home,
name: "root"
},
{
path: "/settings",
component: Settings
},
{
path: "/applications",
component: Applications
2020-03-17 22:16:34 +00:00
},
{
path: "*",
redirect: { name: "root" }
2020-02-02 22:42:18 +00:00
}
];
const AppRouter = new VueRouter({ routes, mode: "history" });
export default AppRouter;
</script>