Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

284
Visualizações
Nuxt nested routing doesnt work 2 levels deep

I'm trying to build a Nested Page in Nuxt using this guide and this guide and running into a problem

What I want is:

  1. foobar.com/2021 shows me the parent page for the year
  2. foobar.com/2021/jun shows me the parent page content for the year + child page for the month
  3. foobar.com/2021/jun/edit shows me the parent page content for the year + the 'edit' child page for that month.

In the above cases, both the '2021' part and the 'Jun' part will be dynamic

The problem: I can get the first 2 to work but the not the edit route. This is what works currently:

/pages _year.vue _year/ _month.vue index.vue

It's demonstrated in this codesandbox here

What I've tried to get the edit route to work:

  1. Add a _month folder under _year, right alongside _month.vue
  2. Add a edit.vue there
  3. Add a index.vue in addition
  4. Add a <nuxt-child></nuxt-child> to the _month.vue

All this worked(Codesandbox link)but not exactly in the way I expected: It now shows the Month Content AND the edit content. Which makes sense because these steps convert the month and the edit into a parent-child nesting themselves. But I dont want that. I want edit to be a child of year. Is that not possible?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda