Akryum / Akryum/vue-router-multi-view

How can I have multi-views for a paremeterized url ?

Aberta
#4 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
JavaScript
Estrelas
86
Forks
9
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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
[![Vue Multi Routing Example](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/rj26p25nlq)

Did I miss something or what am I trying to achieve is impossible ?

Many thanks for considering my request.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.