Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

215
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!