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

413
Visualizações
How to structure nested router-outlets and style their components to make them appear in columns next to each other in Angular?

WHAT I AIM TO ACHIEVE:

I want to make a Single Page Application with three columns on one page. Each column is a component and should show data according to the URL (dynamic parameters). The relation between the data is hierarchical from left to right. So if the user clicks on an item of the left column, the data in the other columns has to change accordingly. The selection should be reflected in the ULR so a user can save a specific selection or send it to others. Here a quick Design to make this easier to understand:

enter image description here

PROBLEM

I struggle with structuring the app/template to make this work. In this StackBlitz I tried nesting the router-outlets, but I cannot style the cards properly. https://stackblitz.com/edit/angular-ivy-uh3636?file=src%2Fapp%2Flayout%2Fget-data.service.ts,src%2Fapp%2Flayout%2Flayout.component.css

The result looks like this when everything is selected: enter image description here

"Children of selected thing" should be in the middle and "Detail of selected child" should be on the right. When nothing is selected yet, one can see the alternative text of the second column, but without styles of the card. The third column is invisible at all until and item of the second column is selected.

Also when I select a new item in the first column, the second column does not react to the changed URL parameter, but the third does.

As an alternative approach, I already tried to use named router-outlets on one layout component. Although the styling worked better with this approach, I faced other and more severe problems, e.g. navigation.

I would appreciate any help or tips on this.

about 4 years ago · Santiago Gelvez
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