N
N
NiceScript2019-10-03 09:58:33
Vue.js
NiceScript, 2019-10-03 09:58:33

How to organize vue router in modal app?

The bottom line is that half of the pages in the project should be modal windows that open on top of the page on which it was opened.
The question is how to organize routing.
Modal windows must have their own url, and if it was followed without a history, then the base page opens with a window on top.
That is, there is a notes page, a note was opened in it, the modal opened on top of the notes page. The item is listed in the note. Clicked a product and the product opened in a modal window on top of it.
In general, any number of modal windows with routing is needed.
When closing by history, we return to the previous one, otherwise to the base
Perhaps someone came across and can push in the right direction, for 4 days I go through the options, it doesn’t work. Perhaps there is something simpler, maybe some kind of package is ready.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Anton, 2019-10-03
@Fragster

Since something else should be under the modal window when clicking on the link, then nested routes are most likely suitable. Well, either in the query of the "parent route" pass the sign of the opening of the dialog and forward it to props or hang watch on '$route.query.Sign'.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question