I have a 3rd party module that I am using for authentication- OktaAuthModule.
For it to be imported in my root module (app.module.ts), it needs to first be configured like this-
const config = {
url: https://myurl.com/
}
@NgModule({
declarations: [ ... ],
imports: [
OktaAuthModule.initAuth(config),
],
...
});
I need to produce a single build that can be deployed to multiple runtimes, each having a different config for this module.
Using the built-in "ng build --env " works fine, but requires multiple builds. The APP_INITIALIZER hooks seem to run after this "imports" array has been processed.
I was hoping to make an API call that could pull this information each time the app is deployed. I don't have any idea where I can add this code in the app.module.ts file?
Thanks in advance for any advice / suggestions.