1
0
Fork 0
mirror of https://github.com/Findus23/RadioStats.git synced 2024-09-19 16:03:48 +02:00
RadioStats/web/routes.js
2018-02-09 22:57:07 +01:00

42 lines
972 B
JavaScript

import Vue from 'vue';
import List from './List.vue';
import Router from 'vue-router';
Vue.use(Router);
let router = new Router({
mode: 'history',
routes: [
{
path: '/',
redirect: "/oe3"
},
{
path: '/:channel',
name: 'List',
component: List,
props: true,
// children: [
// {path: '/:language/:id', component: L, name: 'itemModal'}
// ]
},
{
path: '*',
redirect: '/'
}
]
});
router.afterEach((to, from) => {
_paq.push(['setCustomUrl', to.fullPath]);
if (from.matched.length !== 0 && from.fullPath !== "/") {
_paq.push(['setReferrerUrl', from.fullPath]);
}
_paq.push(['setGenerationTimeMs', 0]);
_paq.push(['setDocumentTitle', document.title]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
});
export default router;