Answer the question
In order to leave comments, you need to log in
How to create a reactive variable that accepts route parameters?
When clicking, I pass parameters (videocards, processors)
@click="$router.push({name: 'adminVideo', params: {id: 'videocards'}})"
@click="$router.push({name: 'adminVideo', params: {id: 'processors'}})"
setup() {
const route = useRoute()
const path = computed(() => route.params.id)
const routParam = path.value
return { routParam}
}
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