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

115
Views
Angular Global Service recreated every time I manually switch between components

I have a service called GlobalserviceService and two components FirstComponent available under the path: http://localhost:4200/first/app and SecondComponent available under the path http://localhost:4200/second/app. Each time I type new URL to switch from current component to the other one, my GlobalserviceService gets recreated (constructo is called) so I lose all data stored previously in it. Is there a way to prevent that from happening? The Sample app is stored in git repository https://github.com/rejkid/test-app.git

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