- correct citation in datset-detail.component.ts

- enable subdomain routing
This commit is contained in:
Arno Kaimbacher 2022-01-14 12:57:06 +01:00
parent 7e47b30340
commit eb8803d7a8
7 changed files with 304 additions and 12 deletions

View file

@ -71,7 +71,7 @@ const routes = [
},
];
const router = createRouter({
const index = createRouter({
history: createWebHistory(),
routes,
// scrollBehavior(to, from, savedPosition) {
@ -81,4 +81,4 @@ const router = createRouter({
},
});
export default router;
export default index;

41
src/router/route1.ts Normal file
View file

@ -0,0 +1,41 @@
// import Vue from 'vue';
// import Router from 'vue-router';
import { createWebHistory, createRouter } from "vue-router";
import DatasetDetailComponent from "@/views/dataset-detail.component.ts/dataset-detail.component";
// Vue.use(Router);
// export default new Router({
// mode: 'history',
// routes: [
// {
// path: '/',
// name: 'Route1',
// component: Route1,
// },
// ],
// });
const route1 = createRouter({
history: createWebHistory(),
routes: [
// {
// path: '/',
// name: 'Route1',
// component: Route1,
// },
{
path: "/10.24341/tethys.:datasetId",
name: "dataset2",
component: DatasetDetailComponent,
props: true,
},
],
// scrollBehavior(to, from, savedPosition) {
scrollBehavior() {
// return desired position
document.getElementById("app")?.scrollIntoView();
},
});
export default route1;