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

104
Visualizações
Angular Ngoninit getting called everytime while routing

I have one component Details where the routes for other child components is there. What is happening is that when I route to any other child component then the onint of the Details is getting called.

For Example- example.com/details/123123123/profile is my current route

I am navigating to example.com/details/12312331/pastappointment

then the NgOnInit of Details is getting called. Which is calling all the apis that I don't want.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You have to use

<router-outlet></router-outlet> 

inside your Details component.

about 4 years ago · Juan Pablo Isaza Relatório
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