Akryum / Akryum/vue-router-multi-view
How can I have multi-views for a paremeterized url ?
- Lingua principale
- JavaScript
- Stelle
- 86
- Fork
- 9
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Hi,
Thank you for this great vue router library.
I'm trying to realize a dynamic navigation. Here is my vue template :
```vue
{{item.label}}
export default {
name: 'app',
data() {
return {
routeName: "ParamRoute",
paramField: "urlParam",
items: [
{
urlParamValue: "FIRST",
label: "First section"
},
{
urlParamValue: "SECOND",
label: "Second section"
}
]
}
}
}
```
My router definition :
```javascript
export default new Router({
mode: "history",
routes: [
{
path: "/",
redirect: { name: "ParamRoute" }
},
{
name: "ParamRoute",
path: "/:urlParam",
component: Hello,
props: route => ({ name: route.params.urlParam })
}
]
});
```
As a result, I do not obtain multiple views for the route "ParamRoute". The behaviour is the same as with classical tag ``.
I note that my "router-link v-for" navigates to the same named route but routes /FIRST and /SECOND have not the same views.
I have an example at
[](https://codesandbox.io/s/rj26p25nlq)
Did I miss something or what am I trying to achieve is impossible ?
Many thanks for considering my request.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.