Answer the question
In order to leave comments, you need to log in
How to change a variable in a template from a router?
There is App.vue:
<template>
<div id="app">
<Header-Component></Header-Component>
<router-view></router-view>
</div>
</template>
<script>
import router from './router'
import Vue from 'vue'
import HeaderComponent from './components/Header'
import axios from 'axios'
export default {
name: 'app',
router,
components: {
HeaderComponent
}
}
</script>
<template>
<div>
{{ModuleName}}
</div>
<template>
const router = new Router({
'mode': 'history',
'routes': [{
path: '/',
component: SearchPage,
},
{
path: '/analytic',
component: AnalyticPage,
},
]
})
export default router
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question