Answer the question
In order to leave comments, you need to log in
How to pass value to router-view?
I'm making a virtual lab and using vue. I use vue-router to provide navigation. Everything would be fine, but I need to switch between the experience itself and the theory of experience. To switch, I made buttons in the header, which are not included in vue-router.
I would like that when one button is pressed, there is a signal to switch to theory, and when another button is pressed, there is a signal to switch to practice.
UPD: I solved it using props on child components
Answer the question
In order to leave comments, you need to log in
So, what's the problem? Do it by clicking on the button this.$router.push(куда там вам надо)
.
In general, it’s not very clear - why are there some buttons, why router-link
didn’t you like it?
Transfer with. props
this.$router.push({
name: 'CalculateCreate',
params: { calculationData: calculationData }
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question