Y
Y
Yuri Valdis2018-03-19 18:11:09
Vue.js
Yuri Valdis, 2018-03-19 18:11:09

How to place multiple components on the same route (Vue)?

There is a component in which the submenu is located (in the code it is SubMenuExhibitions, the list of menus is passed to it)

<template>
  <div class="container">
    <h1>Exhibitions</h1>
    <SubMenuExhibitions
      v-bind:sub_menu="this.sub_menu"
      v-bind:current_url="this.current_url"
    />
    <router-view></router-view>
  </div>
</template>

By clicking on these one of the submenu lists, using routing, we go to another component, and the submenu, for obvious reasons, disappears.
It is necessary that the submenu does not disappear, you do not want to copy-paste the submenu into each component.
That is, the functionality is identical to tabs, but I use routing

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
D3lphi, 2018-03-19
@jurapuris

nested paths

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question