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

216
Visualizações
Is it possible to persist Angular 13 Component-Objects in Memory?
  • In my architecture, I'm using a routing main-component, to switch between sections of my app in which I use single components.

  • Also, I have one component in the main-component which stays in 'foreground' all the time and which is needed to be used in combination with the components of the other sections.

  • For communication between the 'fixed' component and the other components, I am using a subsciption to the topics of the fixed component.

  • Now: when switching through the sections via the routing module, the lifetime of the switchable components is over; their OnDestroy-Methods are getting called (the subscriptions get canceled.)

  • When an Event happens, while the other component is not created (which is the case when the user views another route), it can't receive the events.

  • In my use case it should be possible to trigger an event in the 'fixed' component, which then triggers the router to be switched to the correct routing-path and get the 'switch'-component-object. This object also needs the information, which the fixed component sent.

  • I hope, my explaination is thorough and understandable (also see the attached draft), I'm relatively new to angular and web programming in genereal .

  • Now I stumbled upon the Angular RouteReuseStrategy but I'm afraid it won't help, as it kind of 'recreates' a saved state of the before-visited route and the components behind it are 'inactive' and can't receive events either.

Does anyone has a hint for me? Maybe my concept needs a makeover.

enter image description here

Greets, Che

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