Z
Z
zakharkang2017-08-23 08:36:40
JavaScript
zakharkang, 2017-08-23 08:36:40

How to build an application in this case?

Hello.
There is a long list of options - link parameters for the JSON request.
When a button is clicked, this JSON is requested, a modal window is called ...
If a modal window can be (should be, as I understand it) a component, then what are the "options" and the button? I don't think components. How exactly does the binding take place?
The question is too stupid, but, having lost a day looking for the right answer (this is even more stupid), I decided to write here. Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Kulakov, 2017-08-23
@zakharkang

1. Component - modal window
2. Component containing a button
3. Service with functions to which parameters are passed to get json.

A
Alexander, 2017-08-23
@boratsagdiev

Options and a button are also parts of other components (in your case, one most likely).
You can bind components through events or storage (vuex).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question