46 lines
811 B
Vue
46 lines
811 B
Vue
|
|
<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 Call from "../views/call.vue";
|
|
import ChildProfile from "../views/child_profile.vue";
|
|
|
|
const routes: RouteConfig[] = [
|
|
/** Define Application Routes */
|
|
{
|
|
path: "/",
|
|
component: Home,
|
|
name: "root"
|
|
},
|
|
{
|
|
path: "/settings",
|
|
component: Settings
|
|
},
|
|
{
|
|
path: "/call/:id",
|
|
component: Call
|
|
},
|
|
{
|
|
path: "/child/:id",
|
|
component: ChildProfile
|
|
},
|
|
{
|
|
path: "*",
|
|
redirect: { name: "root" }
|
|
}
|
|
];
|
|
|
|
const AppRouter = new VueRouter({ routes, mode: "history" });
|
|
|
|
export default AppRouter;
|
|
</script>
|