0👍
set the router path correctly with a parameter:
{
path: '/:languageParameter/summary',
name: 'About',
....
}
in your computed get the getter value into the component:
import { mapGetters } from 'vuex';
@Component({
computed:{
...mapGetters(['getlang'])
}
})
then bind the value of getter from computed into your router-link:
<router-link :to="`${getlang}/summary`">
<button type="button" @click='questionsFinish' class="btn btn-primary"
:disabled="!isFinishStepEnabled">{{$lang.message.solution_calculate}}
</button>
</router-link>
- [Vuejs]-How to edit my store so it can take all of my inputs in array to my state?
- [Vuejs]-How to get url from :href in vue and axios?
Source:stackexchange.com