Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

222
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda