Is it possible to have a service only used by an AuthGuard in the same module be a singleton?

I haven’t been able to get it to work. It seems like the constructor of the auth guard is only called once, but I get a different instance of the service when canActivate is called in the guard.

Is there a way to confirm this? Is there a thing I can log to get the instanceId of the service or something?


Discover more from Coursity

Subscribe to get the latest posts sent to your email.

Leave a Comment

Your email address will not be published. Required fields are marked *

Discover more from Coursity

Subscribe now to keep reading and get access to the full archive.

Continue reading

Scroll to Top
Simon says web design. Frequently asked questions get a host.