Is there a method to access a service provided at bootstrap within static class methods?
I don't have any code to share right now, but I've been experimenting with the standard syntax using Injector
(you can find more information here). Whenever I use resolveAndCreate()
on a service (I've also tried other Injector methods), a new instance is created and it overwrites the bootstrapped instance.
The scenario intended for this is when using the @CanActivate()
decorator. My current workaround involves setting window["__ready__"]
once the service is ready and then utilizing that in the decorator...