I am looking for something that lets me execute code when a certain module is initialized. This module is lazy loaded in my application. The APP_INITIALIZER only works for the app initialization process (once at beginning starting at the main module that is bootstrapped).
I cannot use the constructor of the lazy loaded module since my service returns a Promise and I need the response synchronously for working in this lazy loaded module.
Use a resolver. Resolvers are perfect for what you need.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With