Angular/Ionic Singleton gets destroyed after refresh

i have a singleton typescript class that stores the Login Credentials of a user. I set them on the login Page and go to the next page with my Angular Router.navigate. (without params), on the next page i want to consume my singleton, and it works perfectly, but if Irefresh the page the singleton is undefined?
How can i solve this?

This is the error after refreshing:

  • core.js:5980 ERROR Error: Uncaught (in promise): TypeError: Cannot
    read property ‘socialSecurityNumber’ of undefined TypeError: Cannot
    read property ‘socialSecurityNumber’ of undefined

Thanks

176 thoughts on “Angular/Ionic Singleton gets destroyed after refresh”

  1. Howdy! Someone in my Facebook group shared this site with us so I
    came to take a look. I’m definitely loving the information. I’m book-marking and will be tweeting this to my followers!
    Outstanding blog and excellent design.

    Reply
  2. I would like to express appreciation to you for rescuing me from this type of incident. After surfing through the world-wide-web and seeing things which are not productive, I believed my life was gone. Being alive devoid of the solutions to the difficulties you’ve fixed by way of your main short post is a crucial case, and ones that might have badly affected my entire career if I had not encountered your site. That skills and kindness in handling the whole lot was vital. I’m not sure what I would have done if I hadn’t encountered such a point like this. I can at this time look forward to my future. Thanks very much for your skilled and amazing help. I won’t think twice to recommend your blog post to any individual who needs to have support on this area.

    Reply
  3. I have been browsing online greater than three hours as of late, yet I by no means
    discovered any attention-grabbing article like yours.
    It is pretty worth sufficient for me. In my view, if all website owners and
    bloggers made good content as you probably did, the internet shall be a
    lot more helpful than ever before.

    Reply
  4. Hey would you mind letting me know which webhost you’re utilizing?
    I’ve loaded your blog in 3 completely different internet browsers and I
    must say this blog loads a lot faster then most. Can you
    recommend a good web hosting provider at a honest price?
    Many thanks, I appreciate it!

    Reply
  5. Greetings from California! I’m bored to tears at work so I decided to browse your blog on my
    iphone during lunch break. I really like the information you provide here and can’t wait to take a look when I get home.
    I’m amazed at how quick your blog loaded on my phone ..
    I’m not even using WIFI, just 3G .. Anyways, good blog!

    Reply
  6. Hi would you mind letting me know which web host you’re working with?

    I’ve loaded your blog in 3 completely different web
    browsers and I must say this blog loads a lot quicker then most.
    Can you recommend a good hosting provider at a fair price?
    Cheers, I appreciate it!

    Reply
  7. I have been surfing online more than three hours today, yet I never found any interesting article like yours.

    It is pretty worth enough for me. In my view, if all web owners and bloggers made good content as you did,
    the web will be much more useful than ever before.

    Reply
  8. Hey would you mind letting me know which hosting company you’re working with?

    I’ve loaded your blog in 3 completely different
    web browsers and I must say this blog loads a lot quicker then most.
    Can you recommend a good internet hosting
    provider at a reasonable price? Thanks a lot, I appreciate it!

    Reply
  9. Howdy, i read your blog occasionally and i own a similar one and i was just wondering if you get a lot of spam comments?

    If so how do you prevent it, any plugin or anything you can recommend?
    I get so much lately it’s driving me mad so any help is very much appreciated.

    Reply
  10. Its like you read my thoughts! You appear to understand so much about this, like you wrote the guide
    in it or something. I believe that you simply can do with a few p.c.
    to drive the message home a little bit, however instead
    of that, this is magnificent blog. A fantastic read. I will certainly be back.

    Reply
  11. Pingback: cheap legal cialis
  12. I leave a response when I appreciate a article on a blog
    or I have something to add to the discussion. It is a result
    of the fire displayed in the post I read. And on this post The Growing Trends in Content Theft: Image
    Theft, Feed Scraping, and Website Hijacking ? Lorelle on WordPress.

    I was moved enough to post a thought 😉 I do have 2
    questions for you if you do not mind. Is it only me or do a few of the remarks look as if they are coming from brain dead individuals?
    😛 And, if you are posting on additional online social sites, I would like
    to keep up with you. Could you make a list all of your communal
    pages like your twitter feed, Facebook page or linkedin profile?

    Reply
  13. Pingback: 20mg cialis
  14. Pingback: viagra
  15. Pingback: viagra cheapest
  16. Pingback: sildenafil 50