M
M
mafe_ru2017-09-06 19:16:03
JavaScript
mafe_ru, 2017-09-06 19:16:03

How to properly use vuejs components?

Hello! I'm learning Vue. I can't figure out how to use components.
Let's say I have a single-file component: <select></select>
I use it in the parent component:

<app>
<select></select>
<form></form>
</app>

The logic of my application implies that after the @change в <select>user is redirected to the calculator page. By means of routing. This page is another component
<calc>
<select></select>
<step1></step1>
<step2></step2>
</calc>

It's just that the calculator page works fine, but if we go from the <app>selected selects are not transferred. Explain please, if not difficult.
Why is this happening, how to use the component (the same) several times on different pages so that it performs the same function.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Kulakov, 2017-09-06
@kulakoff Vue.js

What means the selected selects are not transferred? What did you choose in the first select? If yes, then these are different instances of the same component and they are not related to each other in any way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question